[redland] Fwd: Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ )

James Michael DuPont mdupont777 at yahoo.com
Tue Dec 10 06:03:31 GMT 2002


Here is a message about the start of the C# wrapper.
you can download the current status here:
http://introspector.sourceforge.net/dotgnu/redland.zip


--- James Michael DuPont <mdupont777 at yahoo.com> wrote:
> From James Michael DuPont Tue Dec 10 04:03:59 2002
> Received: from [194.202.25.243] by web13301.mail.yahoo.com via HTTP;
> Tue, 10 Dec 2002 04:03:59 PST
> From: James Michael DuPont <mdupont777 at yahoo.com>
> Subject: Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++
> )
> To: Neil Cawse <neilcawse at hotmail.com>, Gopal V
> <gopalv82 at symonds.net>,
>   Dave Beckett <dave.beckett at bristol.ac.uk>
> CC: developers at dotgnu.info, mono-list at ximian.com
> 
> I downloaded the example, 
> > http://www.geotab.ca/Old/SwigCLRNeilCawse10dec02.zip
> 
> I have done a quick test of the generation, using the cvs version of
> redland.i.
> 
> http://introspector.sourceforge.net/dotgnu/redland.zip
> 
> Very impressive for a first start. It looks just like code from
> XSharp,
> 
> Here is a method i have been fighting with with the php4 swig :
> int librdf_serializer_serialize_model(librdf_serializer* serializer,
> FILE *handle, librdf_uri* base_uri, librdf_model* model);
> 
> The generated code is this :
> [DllImport("Redland")]
>   public static extern int librdf_serializer_serialize_model(int
> jarg1,
> int jarg2, int jarg3, int jarg4);
> 
> I dont have time at work to look into this, 
> but it looks like all the type information got killled.
> 
> I will try it out with pnet at home and report any success, or what I
> had to change to get this running. 
> 
> 
> If all works out, we can use swig for creating lots of C# wrappers. 
> 
> Thanks for the tips, I will be looking into this in detail.
> 
> mike
> --- Neil Cawse <neilcawse at hotmail.com> wrote:
> > ok
> > 
> > I think using swig makes sense:
> > the original code is tested and works
> > it will be improved and maintained by people working on swig.
> > 
> > now I don't want to put more work into this if the approach is
> wrong.
> > Has
> > anyone got a better idea?? Should we be waiting for Binge from qt#
> > project -
> > or Gopal your stuff?
> > let me know!
> > Do any of you bright people want to finish this\improve this? I
> might
> > have
> > some time in the holidays.
> > 
> > some things:
> > Just started!
> > It's the Java SWIG - just changed for c# - you'll still see all
> java
> > comments
> > Using VC 7 solution to build - you might have to recreate because
> im
> > using
> > Visual Studio Everett final beta.
> > Modifications off the stock are basically in 3 places:
> > in Examples\Clr. Two examples I created. Im using class to do my
> > testing
> > in Source\Modules1.1\clr.cxx (copied from java.cxx)
> > in Lib\Clr.swg - mappings
> > 
> > 
> > ----- Original Message -----
> > From: "Gopal V" <gopalv82 at symonds.net>
> > To: "Neil Cawse" <neilcawse at hotmail.com>
> > Cc: <developers at dotgnu.info>
> > Sent: Sunday, December 08, 2002 11:30 AM
> > Subject: [DotGNU]Swig and C# (was: Strategy for dealing with C++ )
> > 
> > 
> > > If memory serves me right, Neil Cawse wrote:
> > > > ** now adding C#
> > >
> > > Could you point me to your source code ? ... (I've written 80% of
> > my
> > > generator in python anyway) .... I think it will be interesting
> to
> > see
> > > how your code handles function pointers , structs and tracing
> back
> > typedefs
> > > to their original types...
> > >
> > > I have used Swig for python and found it grossly insufficent for
> my
> > > work ... (easy, but not sufficent) ... I finally wrote my own
> > wrappers
> > > in C for Python ... which is a lot more flexible than SWIG ... I
> > suppose
> > > that might be true for C# as well ... But to be sure, I need a
> peek
> > at
> > > Swig - C#.
> > >
> > > My PInvoke wrapper is built from the idea originated from Rhys
> with
> > X11#.
> > > Which is accessible from the dotgnu-libs CVS .. That concept of
> > wrapping
> > > code without C call-ins , is as portable as PInvoke ever gets ...
> > (Rhys
> > > is guy to follow for portability....)
> > >
> > > Gopal
> > > --
> 
> 
> 
> =====
> James Michael DuPont
> http://introspector.sourceforge.net/


=====
James Michael DuPont
http://introspector.sourceforge.net/









More information about the redland-dev mailing list