[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: |
Gopal V |
Subject: |
Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ ) |
Date: |
Mon, 9 Dec 2002 15:43:52 +0530 |
User-agent: |
Mutt/1.2.5i |
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 . 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 ... (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 ...
Gopal
--
The difference between insanity and genius is measured by success
- 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., James Michael DuPont, 2002/12/03
- 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 <=
- 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++ ), 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