swig-py: Fix return value of svn_repos_fs_commit_txn(). * subversion/bindings/swig/svn_repos.i (typemap(argout) (const char **conflict_p, svn_repos_t *repos, svn_revnum_t *new_rev)): New typemap. Found by: cmpilato Index: subversion/bindings/swig/svn_repos.i =================================================================== --- subversion/bindings/swig/svn_repos.i (revision 1880203) +++ subversion/bindings/swig/svn_repos.i (working copy) @@ -109,6 +109,32 @@ #endif /* ----------------------------------------------------------------------- + Fix the return value for svn_repos_fs_commit_txn(). If the conflict + result is NULL, then %append_output() is passed Py_None, but that goofs + up because that is *also* the marker for "I haven't started assembling + a multi-valued return yet" which means the second return value + (new_rev) will not cause a 2-tuple to be manufactured. + + The answer is to explicitly create a 2-tuple return value. + + FIXME: Do the Perl and Ruby bindings need to do something similar? +*/ +#ifdef SWIGPYTHON +%typemap(argout) (const char **conflict_p, svn_repos_t *repos, + svn_revnum_t *new_rev) { + /* this is always Py_None */ + Py_DECREF($result); + /* build the result tuple */ + $result = Py_BuildValue( +%#if PY_VERSION_HEX >= 0x03000000 + "yi", +%#else + "zi", +%#endif + *$1, (long)*$3); +} +#endif +/* ----------------------------------------------------------------------- handle svn_repos_get_committed_info(). */ #ifdef SWIGRUBY