SWIG wrapper/Python2.5c1 problem

Discussion in 'Python' started by andrew.gregory@npl.co.uk, Aug 29, 2006.

  1. Guest

    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.
    , Aug 29, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier
    Replies:
    0
    Views:
    402
    Xavier
    Aug 6, 2003
  2. Skip Montanaro
    Replies:
    1
    Views:
    416
    Thomas Heller
    Aug 7, 2003
  3. snacktime
    Replies:
    13
    Views:
    545
    Dan Sommers
    Feb 22, 2005
  4. Uwe Mayer

    changing from python2.3 to python2.4

    Uwe Mayer, Apr 8, 2005, in forum: Python
    Replies:
    1
    Views:
    287
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 9, 2005
  5. Ksenia Marasanova
    Replies:
    2
    Views:
    341
    Mike Meyer
    Nov 17, 2005
Loading...

Share This Page