c++ extension, problem passing argument

Matteo tadwelessar at gmail.com
Fri Mar 13 23:42:17 CET 2009

On 13 Mar, 22:35, Aaron Brady <castiro... at gmail.com> wrote:
> On Mar 13, 1:34 pm, Matteo <tadweles... at gmail.com> wrote:
> > hmmm... looks like SWIG has a problem with double pointers. I googled
> > around a bit and found:
> >http://osdir.com/ml/programming.swig/2003-02/msg00029.html
> > anyone knows how to write a small wrapper to do the appropriate
> > dereferencing?
> 'ctypes' may be able to do it.  I've done something like this in the
> past:
> double_ptr= ctypes._cast( PyObject, sing_ptr )
> Up your alley?

Thanks for your suggestions, but still no luck here.

ctypes appears to work only with its own types, I tried its cast,
byref and pointer functions, but only received TypeError exceptions
such as:
TypeError: byref() argument must be a ctypes instance, not 'list'
TypeError: _type_ must have storage info

This is getting really annoying :(

The following link may contain useful info, but I find it somewhat

More information about the Python-list mailing list