[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Patch] Fix position of apr_initialize() in Python bindings

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-10-01 02:08:17 CEST

Branko Čibej wrote:
> Branko Čibej wrote:
>
>> David James wrote:
>>
>>> On 9/30/05, Max Bowsher <maxb@ukf.net> wrote:
>>>
>>>
>>>> Move apr initialization into the C code that runs as a result of
>>>> "import
>>>> libsvn._core", which should be imported as a result of importing any
>>>> other
>>>> module.
>>>>
>>>> I'd commit this, but I'm about to go out for a few hours, so I'll
>>>> just post
>>>> it here for now.
>>>>
>>>>
>>>> Index: subversion/bindings/swig/core.i
>>>> ===================================================================
>>>> --- subversion/bindings/swig/core.i (revision 16377)
>>>> +++ subversion/bindings/swig/core.i (working copy)
>>>> @@ -635,6 +635,8 @@
>>>> PyObject *svn_swig_py_register_cleanup(PyObject *py_pool, apr_pool_t
>>>> *pool);
>>>>
>>>> %init %{
>>>> +apr_initialize();
>>>>
>>>
>>> Can we add "atexit(apr_terminate)" here, and remove apr_terminate from
>>> proxy_apr.swg? I think this would be a good idea, because it would
>>> guarantee that no pools are used after APR is terminated.
>>>
>>>
>> +1
>>
>> We do something similar in svn_cmdline_init.

Thanks for the reference, I've committed the change in r16382.

> On second thoughts, is there any reason why this should be specific to
> the Python bindings? I'd use the same mechanism everywhere.

This discussion is specific to the Python bindings because it is all about
how to work the apr_initialize()/apr_terminate() calls into the Python
module framework such that the bindings user doesn't have to care about
them.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 1 02:09:10 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.