I wish I had saved a copy of the error. It's been quite a while.
In Python, calling a function that has more than one output goes something like this:
out1, out2, out3 = foo()
The error said something to the effect of "there are more variables than the number of 'things'
returned from the function." Of course the actual error message didn't use those words exactly,
but that was what "my interpretation."
The error was easy enough to reproduce. I'll revert, rebuild and get back to you with the exact
--- Karl Fogel <firstname.lastname@example.org> wrote:
> Marshall White <email@example.com> writes:
> > Another message in that thread has a potential patch to fix it.
> > In the current bindings SOME functions that have "const char **"
> > parameters return Pythong string objects and some do not (they
> > return that *_p_char crap instead). From the digging around I did,
> > it looked like they ALL should work the same way. That was what my
> > patch did.
> I haven't applied your patch from
> because I'm having trouble understanding whether it's correct. If a C
> function returns a NULL string by reference, it seems your patch would
> convert it to the empty string, instead of to None. For example,
> assuming this commit is successful:
> const char *conflict_path;
> svn_revnum_t new_rev;
> SVN_ERR (svn_fs_commit_txn (&conflict_path, &new_rev, txn));
> ... then up at the Python level, conflict_path would look like ''
> instead of None.
> Clearly this is intentional; your log message even says it:
> * subversion/bindings/swig/svn_string.i
> (%typemap(python,argout,fragment="t_output_helper") const char **OUTPUT):
> Return an empty string instead of a Py_None binding. If the Python code
> is expecting something, and the function generates nothing, a run-time
> error will result.
> Added "in,numinputs=0" and an initial value for "temp" to
> (%typemap(python,in,numinputs=0) const char **OUTPUT
> (const char *temp = (const char *)0))
> But what exactly is the error that will result if we just use None
> here? It's kind of weird to get '' back when None is the more
> intuitive value ('' could even be considered incorrect, as it implies
> a conflict on the root directory).
> Whatever problems you were seeing might be related to the problems
> that revision 5137 works around. I'll write about those in a separate
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Thu Feb 27 22:16:15 2003