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

Re: svn commit: rev 3572 - trunk/subversion/bindings/swig

From: <cmpilato_at_collab.net>
Date: 2002-10-31 15:33:18 CET

Greg Stein <gstein@lyra.org> writes:

> On Tue, Oct 29, 2002 at 11:28:31PM -0600, cmpilato@tigris.org wrote:
> >...
> > +svn_error_t *
> > +svn_swig_py_get_commit_log_func (const char **log_msg,
>
> This file doesn't use spaces in the functions.

Fixed.

> >...
> > + *log_msg = PyString_AS_STRING(result);
> > + Py_DECREF(result);
> > + return SVN_NO_ERROR;
> > +}
>
> Yikes! I saw you fixed the decref later, but that just means you're leaking
> a Python object on each call(!). You ought to dup the string into the pool,
> and keep the decref in there.

Okey dokey. I still don't quite 'get' how these lifetime issues pan
out when using pools AND a language that manages its own memory.

> >...
> > +++ trunk/subversion/bindings/swig/svn_delta.i Tue Oct 29 23:28:30 2002
> >...
> > -/* ### hack. force the fragment's inclusion. t_output_helper is required
> > - ### by the application of an OUTPARAM, but the fragment doesn't get
> > - ### brought into this compilation unit. force it here. */
> > -%typemap(python, in,fragment="t_output_helper") (const char *buffer, apr_size_t len) {
>
> How do you get t_output_helper into this link unit? IOW, does _delta.so
> actually load now? I was finding that it was necessary to use that hack to
> ensure the fragment got in there.

Using swig-1.3.15, the t_output_helper is present in the .c file. I
didn't do anything differently. _delta loads fine.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 31 16:13:08 2002

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.