[pcre-dev] [Bug 1174] allow passing of pcre_{malloc, free, …

Top Page
Delete this message
Author: Gertjan Halkes
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1174] allow passing of pcre_{malloc, free, stack_malloc, stack_free, callout} as parameters
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1174




--- Comment #3 from Gertjan Halkes <eximbugz@???> 2011-11-08 09:59:27 ---
If by compile-time you mean the call to pcre_compile (or pcre_compile2) and not
the compile of the pcre library itself, then yes, this would meet my needs.
Basically, the only time this solution would be insufficient, is when a library
wants to use some special purpose allocation code, which will probably be rare.

As a side note: the pcreapi man-page currently says to free the memory
allocated by pcre_compile using pcre_free. This would have to change as well
probably, regardless of the eventual solution. For the less invasive solution
either by updating the man-page to say free must be used directly when using
PCRE_USE_MALLOC, or supplying a separate function to free the result of
pcre_compile and friends.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email