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

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-10-17 13:37:29 CEST

On Thu, Oct 17, 2002 at 01:56:37AM -0500, trow@tigris.org wrote:
>...
> +++ trunk/subversion/bindings/swig/swigutil_py.c Thu Oct 17 01:56:37 2002
>...
> +{
> + PyObject *function = baton;
> + PyObject *arglist;
> + PyObject *result;
> +
> + if (function != NULL && function != Py_None)
> + {
> + arglist = Py_BuildValue("(siisiii)",
> + path, action, kind, mime_type,
> + content_state, prop_state, revision);
> +
> + result = PyEval_CallObject(function, arglist);
> +
> + Py_XDECREF(arglist);
> + Py_XDECREF(result);
> + }

It would be simpler to use PyEval_CallFunction() here. See the log_receiver
thunk.

Second, since this function doesn't propagate errors, you probably should
check for result==NULL and, if so, clear the exception with PyErr_Clear()
(see pyerrors.h).

I suspect that my choice for 'void' for the notification was bad and that
we're going to be changing it...

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 17 13:38:12 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.