On 10/12/2010 12:45 PM, to...@tuxteam.de wrote:
Thus, it would seem safe to call apr_initialize from each extension - I'd just have to make sure that the calls are balanced. Is that right?
Exactly. You can call it as many times as you wish. Making sure the number of calls match.
Another question: what is the difference between apr_terminate() and apr_terminate2()? I didn't understand the remark in the docs [1]
None for unix, but for windows, apr_terminate is _cdecl, and apr_terminate2 is _stdcall. It means you can use apr_terminate in something like atexit(apr_terminate) (atexit in windows requires _cdecl calling convention) even from .dll version of APR. apr_terminate2 uses _stdacall convention meaning you can use it from interpreters (or loading via LoadLibrary/dload) which needs standard calling convention. Regards -- ^TM