SWIG wrapper/Python2.5c1 problem

A

andrew.gregory

If compiling a SWIG wrapper with MinGW 3.2.3 (Windows) get the
following compilation error:

pyprog_wrap.cxx: In function `int
SWIG_Python_ConvertFunctionPtr(PyObject*,
void**, swig_type_info*)':
pyprog_wrap.cxx:2051: invalid conversion from `const char*' to `char*'

Extract from wrapper:

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr,
swig_type_info *ty) {
if (!PyCFunction_Check(obj)) {
return SWIG_ConvertPtr(obj, ptr, ty, 0);
} else {
void *vptr = 0;

/* here we get the method pointer for callbacks */
char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); <--
error occurs here.

This must be caused by a change in Python.h, as there were no problems
with Python 2.3 or 2.4. SWIG version 1.3.29. Used -c++ and -shadow
options.

Can anyone reproduce this?

Andrew.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top