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

Re: svn commit: rev 5608 - trunk/subversion/bindings/swig

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-04-14 09:25:47 CEST

On Mon, Apr 14, 2003 at 02:02:24AM -0500, cmpilato@collab.net wrote:
> gstein@tigris.org writes:
> > Author: gstein
> > Date: Sun Apr 13 21:01:09 2003
> > New Revision: 5608
> >
> > Modified:
> > trunk/subversion/bindings/swig/svn_types.i
> > Log:
> > Patch concept from Mike Pilato and Nicholas Riley. Fixed to use
> > unsigned int by gstein.
> >
> > * subversion/bindings/swig/svn_types.i: Add a typemap for
> > svn_node_kind_t *, so that svn_fs_check_path() is correctly mapped.
>
> Isn't there a more correct (albeit more complex) way to do this using
> 'enum SWIGTYPE'? Not that I'd change this fix if it works, mind you
> -- just wondering.

Yah, there is. Look at the code just below that, for svn_filesize_t.
Basically, we'd just define the actual code to do the mappings.

In the %apply case, however, we get to use whatever was defined for the
'unsigned int' type (in this case). Whether that's the Python, Java, or
whatever language's code.

A tradeoff. I just applied the thing to get it to work. Didn't put too much
brainpower into it, since the enum and unsigned int types are compatible.
I'd be totally fine if it gets expanded out to the "right" code.

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 Mon Apr 14 09:26:22 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.