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

Re: svn commit: r16449 - trunk/build/generator

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-10-05 21:25:00 CEST

David James wrote:
> Yes, probably we should create a warning. I have reinstalled APR as a
> shared library and everything works fine.
> Still, I've found an easy way to get the bindings working with a
> static APR. The following patch makes the Subversion bindings with a
> static APR, on my system, because it initializes APR from inside the
> libsvn_swig_py library as opposed to from within a Python library. (We
> used to initialize APR from within libsvn_swig_py, until we changed
> this behaviour in r16382. That's why static APR builds always used to
> work for me.)

I don't fully understand why that works, but given the change is nice and
simple, I have no objections to it.

A few small suggested tweaks, though.

> Create svn_swig_py_initialize API function for initializing the
> libsvn_swig_py library. This function initializes APR, and sets up
> atexit(apr_terminate). Followup to r16382.
> * swig/core.i:
> Use svn_swig_py_initialize instead of apr_initialize and
> apr_terminate.

The comment above says "these functions". Change to "this function", since
there is now only one there.

> * swig/python/libsvn_swig_py/swigutil_py.h
> (svn_swig_py_initialize): New.

Since you've put some error checking here, check the return value of atexit.
No need to do anything complicated, I'm just thinking of something like
+ if (atexit(apr_terminate) != 0)
+ status = APR_EGENERAL;

> * swig/python/libsvn_swig_py/swigutil_py.c
> (svn_swig_py_initialize): New.

Don't duplicate the documentation comment from the .h file here.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 5 21:26:08 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.