On Fri, Sep 20, 2002 at 03:38:04PM -0500, cmpilato@tigris.org wrote:
>...
> +++ trunk/subversion/bindings/swig/swigutil_py.c Fri Sep 20 15:38:04 2002
> @@ -618,13 +618,18 @@
> {
> PyObject *receiver = baton;
> PyObject *result;
> + swig_type_info *tinfo = SWIG_TypeQuery("SWIGTYPE_p_svn_log_changed_path_t");
> + PyObject *chpaths;
>
> - /* ### for now, we're leaving CHANGED_PATHS outta this. */
> + if (changed_paths)
> + chpaths = svn_swig_py_convert_hash (changed_paths, tinfo);
> + else
> + chpaths = Py_None;
>
> /* ### python doesn't have 'const' on the method name and format */
> if ((result = PyObject_CallFunction(receiver,
> - (char *)"lsssO&",
> - rev, author, date, msg,
> + (char *)"OlsssO&",
> + chpaths, rev, author, date, msg,
> make_ob_pool, pool)) == NULL)
> {
> return convert_python_error(pool);
You need to refcount chpaths properly. svn_swig_py_convert_hash() will
pass a ref back to you, which means you must DECREF it when you're done. To
simplify the decref logic, you can just incref Py_None before putting it
into chpaths. After the function call, then you need to decref chpaths (and
ensure that you do the decref in the error case, too)
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 Sat Sep 21 11:40:32 2002