[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: Dale Hirt <dale_at_sbcltd.com>
Date: 2003-02-28 01:03:20 CET

Well, now I just need to get up to speed on Python. So far, my big question
is, why does resultobj get set to Py_None right away. That seems to me to
be pretty silly. It should be set to NULL, otherwise, if we use a newer
version, then it will return 3 args, instead of the 2 that we desire. Hmmm,
let me think on that part, too.

> -----Original Message-----
> From: Marshall White [mailto:cscidork@yahoo.com]
> Sent: Thursday, February 27, 2003 3:55 PM
> To: Dale Hirt; kfogel@collab.net
> Cc: dev@subversion.tigris.org
> Subject: RE: inconsistency in Python SWIG return parameters
>
>
>
> --- Dale Hirt <dale@sbcltd.com> wrote:
> > > -----Original Message-----
> > > From: Marshall White [mailto:cscidork@yahoo.com]
> > [snip]
> > >
> > > It looks to me like one possible culprit, this funky
> > > "t_output_helper", is generated by SWIG.
> > >
> >
> > You're reading my thoughts on this one. So far, if we're to change
> > anything, this is where I would start. However, then it
> becomes a matter of
> > how do we understand that there is indeed more than one
> return value, or
> > that a None value is permissible. You were right in that
> t_output_helper is
> > lazy, but making it work for it's dinner is going to be hard without
> > breaking a lot of code. Boy, talk about a nice complex issue.
>
> Well it looks like that "generated" was not the right word.
> It is hard coded in a file called "fragments.i"
>
> Greg Stein just posted an email with a wonderful suggestion.
> Perhaps a function similar to "t_output_helper" could be
> written that "does the right thing."
> In the "*.i" files this new function could be specified
> instead of "t_output_helper".
>
>
> >
> > > From reading I see that Dale Hirt is looking into this.
> > > I wish him the best of luck. Perhaps there are command line
> > > options for SWIG that might change
> > > the default behavior of this function. A very quick glance
> > > didn't show anything obvious though.
> > >
> > > I don't want to *duplicate* his effort, but I will look into
> > > this some myself. Maybe two sets of
> > > eyes might be better than one.
> > >
> > Any and all help is always appreciated. Like I said
> before, I'm a relative
> > newcomer to Python, Python extensions, and SWIG, so having
> you look also
> > should help a lot.
>
> I am a newcomer as well. I have been looking at Python for
> about a month now.
>
> >
> > >
> > > Marshall
> >
> > Thanks,
> >
> > Dale
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 28 01:04:15 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.