[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: inconsistency in Python SWIG return parameters

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-02-28 02:26:54 CET

On Thu, Feb 27, 2003 at 04:58:35PM -0800, Greg Stein wrote:
> But in your new helper, single-valued functions will return a one-tuple. I
> don't think that is very nice, so I'm not sure we can use this approach.
> This all looks good, but I also wonder whether we couldn't just use
> Py_BuildValue() to construct the return value for certain multi-valued
> return functions.
> Not sure if we can. I'll see if I can find something...

Ah. It sure looks like we can :-)

I've attached an untested patch. The generated C code looks just fine. If
somebody wants to give it a real run-through, I'd be most thankful!

The basic strategy is that we capture the output-argument processing for the
function and substitute exactly what we want. I'm not sure if the Java
bindings need something similar, but the Java guys can figure it out, I'm


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 Fri Feb 28 02:22:10 2003

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.