[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ )
From: |
James Michael DuPont |
Subject: |
Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ) |
Date: |
Mon, 9 Dec 2002 04:18:37 -0800 (PST) |
--- Gopal V <address@hidden> wrote:
> If memory serves me right, James Michael DuPont wrote:
> > > 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
> >
> > But did you report the problems or look how the swig generators
> could
> > be modified?
>
> My work was far too specialized to modify something so general like
> swig.
> Swig is useful for wrapping C functions , it is not useful for
> building
> Python wrappers .
OK, but for calling C from python?
> Especially when I need a custom marshalling scheme.
> The
> Swig is sort of hard coded for a standard wrapping code ... It does
> not
> handle mapping VarArg python methods onto vararg C methods ...
Ok, makes sense.
> (AFAIK).
>
> case 'i':
> params[count].int32Value\
>
> =(int)(PyInt_AsLong(PyTuple_GetItem(args,count+prefix)));
> count++;
> break;
> case 'c':
> params[count].int32Value=\
>
> (PyString_AsString(PyTuple_GetItem(args,count+prefix))[0]);
> count++;
> break;
>
> Swig is a "Simple Wrapper Interface Generator" IIRC , I'd rather
> write my
> own generator than hack swig to handle this very special case ...
>
> The quoted code is from my Python wrapper shell for C# , And after
> all I
> need to inherit Objects from C# into Python which cannot be done with
> Swig
> at all ...
OK gopal. I see your point. I am looking at the Libxml right now, but
it seems that the xsharp is cleaner code, he does not use any local
functions.
I am looking into this, I hope to have some examples for librdf soon,
with a modified swig to do the job.
mike
=====
James Michael DuPont
http://introspector.sourceforge.net/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., (continued)
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., David Leimbach, 2002/12/03
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., Neil Cawse, 2002/12/05
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., Adam Treat, 2002/12/05
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., Gopal V, 2002/12/06
- ADMIN: Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., David Faure, 2002/12/06
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., Neil Cawse, 2002/12/06
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., Neil Cawse, 2002/12/08
- [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), Gopal V, 2002/12/08
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), James Michael DuPont, 2002/12/09
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), Gopal V, 2002/12/09
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ),
James Michael DuPont <=
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), Gopal V, 2002/12/09
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), Neil Cawse, 2002/12/10
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), James Michael DuPont, 2002/12/10
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), Adam Treat, 2002/12/10
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), James Michael DuPont, 2002/12/10
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), Adam Treat, 2002/12/10
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), James Michael DuPont, 2002/12/10
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), James Michael DuPont, 2002/12/10
- Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ), Gopal V, 2002/12/10
- Re: [DotGNU]Strategy for dealing with C++ virtual functions in a managed binding., David Sugar, 2002/12/06