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

Re: Rcsparse.py

From: Marshall White <cscidork_at_yahoo.com>
Date: 2003-02-28 15:29:14 CET

Greg,

Your patch for svn_string.i was almost exactly what I posted a month ago. :-)
(There was more to my patch, but that was the good acceptable part.)

However, doesn't that just always reduce it down to the OTHER type of problem?
I see you hacked around one specific case in svn_fs.i, but what about any others?

As of Jan 31, the affected functions that had "const char **" args were:
svn_repos_get_committed_info
svn_repos_fs_commit_txn
svn_fs_commit_txn
svn_fs_txn_name
svn_fs_copied_from
svn_fs_merge
svn_opt_format_option
svn_io_open_unique_file
svn_io_detect_mimetype

That list might be slightly different now.

Isn't this really a general case problem anyway?
As in, SWIG doesn't correctly handle functions that return NULL valued pointers as their first
return values?

Ultimately this sounds like something that should be fixed in SWIG, not hacked around in
Subversion (even though that may be necessary in the short term.)

So if Subversion is going to hack around it, wouldn't it be better to have a general solution that
works in every case rather than hack it one arg list at a time? I would argue that this is
exactly what Dale (and myself to some extent) seemed to be getting to.
This same problem can and and I am sure will affect types other than "const char **".

I guess I am looking for your feelings on the overall status of this. Do you consider this a case
closed, or something that still needs attention? Should any more attention be given here, or
should someone start a SWIG crusade?

Marshall

--- Greg Stein <gstein@lyra.org> wrote:
> On Thu, Feb 27, 2003 at 01:59:23PM -0600, Karl Fogel wrote:
> > Marshall White <cscidork@yahoo.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.
>
> Right. 'const char **' should return a Python string object (or None if the
> value is NULL). It looks like all the bindings in svn_fs are returning the
> _p_char crap.
>
> svn_string.i defines the return stuff for 'const char **', so I'm guessing
> that if we just eliminate the type from the OUTPARAM stuff in svn_fs.i,
> that all the string returns will just start working.
>
> Hmm. A bit more than that, but I've got it all patched up now.
>
> Committed this and the commit_txn thing in rev 5143.
>
> 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 Fri Feb 28 15:30:21 2003

This is an archived mail posted to the Subversion Dev mailing list.