[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 3574 - trunk/subversion/bindings/swig

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-10-31 11:10:16 CET

On Wed, Oct 30, 2002 at 12:39:48AM -0600, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/bindings/swig/svn_client.i Wed Oct 30 00:39:48 2002
> @@ -37,6 +37,34 @@
> };
>
> /* -----------------------------------------------------------------------
> + make return commit item structures magically turn into a 3-tuple of
> + (rev, datestring, author).
> +*/
> +%typemap(python,argout,fragment="t_output_helper") svn_client_commit_info_t **
> +{
> + PyObject *list;
> + PyObject *rev, *date, *author;
> + if (!(*$1)) {
> + return Py_None;

Shouldn't that be $result = Py_None?

And this must be INCREF'd.

> + list = PyList_New(3);
> + rev = PyInt_FromLong((*$1)->revision);
> + date = PyString_FromString((*$1)->date);
> + author = PyString_FromString((*$1)->author);
> + if (!(list && rev && date && author)) {
> + Py_XDECREF(rev);
> + Py_XDECREF(date);
> + Py_XDECREF(author);
> + Py_DECREF(list);

list could be NULL also, so this should be an XDECREF.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 31 11:09:57 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.