[Insight-users] WrapITK: more windows build errors

Charl P. Botha cpbotha at gmail.com
Tue Feb 14 14:26:26 EST 2006


Hi there guys, it's me again.

My Windows build was chugging along nicely, until it ran into the
following error:

c:\build\WrapITK-VS71\CommonA\wrap_ITKCommonBasePython.cxx(4536):
error C2664: 'itk::MultiThreader::SetMultipleMethod' : cannot convert
parameter 2 from 'unsigned long (__cdecl *)(void *)' to
'itk::ThreadFunctionType'

The code in question is reproduced below, the line in question is
"(*arg1)->SetMultipleMethod(arg2,arg3,arg4);".

(it finds similar errors for "SetSingleMethod" and "SpawnThread", twice each.)

This looks like standard cableswig generated code, so unless you guys
know exactly where I could start looking to fix this, I'd be tempted
to remove the itkMultiThreader wrapping from wrap_ITKCommonBase.cmake,
or would this be bad?

Thanks for any info,
Charl

The code:
static PyObject
*_wrap_itkMultiThreader_Pointer_SetMultipleMethod(PyObject *, PyObject
*args) {
    PyObject *resultobj;
    itk::SmartPointer<itk::MultiThreader > *arg1 =
(itk::SmartPointer<itk::MultiThreader > *) 0 ;
    int arg2 ;
    unsigned long (*arg3)(void *) = (unsigned long (*)(void *)) 0 ;
    void *arg4 = (void *) 0 ;
    PyObject * obj0 = 0 ;
    PyObject * obj1 = 0 ;
    PyObject * obj2 = 0 ;
    PyObject * obj3 = 0 ;

    if(!PyArg_ParseTuple(args,(char
*)"OOOO:itkMultiThreader_Pointer_SetMultipleMethod",&obj0,&obj1,&obj2,&obj3))
goto fail;
    if ((SWIG_ConvertPtr(obj0,(void
**)(&arg1),SWIGTYPE_p_itk__SmartPointerTitk__MultiThreader_t,
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    arg2 = (int) SWIG_AsInt(obj1);
    if (PyErr_Occurred()) SWIG_fail;
    if ((SWIG_ConvertPtr(obj2,(void
**)(&arg3),SWIGTYPE_p_f_p_void__unsigned_long,
    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
    if ((SWIG_ConvertPtr(obj3,&arg4,0,SWIG_POINTER_EXCEPTION | 0)) ==
-1) SWIG_fail;
    try {
        (*arg1)->SetMultipleMethod(arg2,arg3,arg4);
    }
    catch(std::exception &_e) {
        {
            if ( strstr(const_cast<char*>(_e.what()), ": index out of
range") == NULL ) {
                SWIG_exception(SWIG_RuntimeError, const_cast<char*>(_e.what()));
            }
            else {
                PyErr_SetString(PyExc_IndexError, const_cast<char*>(_e.what()));
                return NULL;
            }
        }
    }

    Py_INCREF(Py_None); resultobj = Py_None;
    return resultobj;
    fail:
    return NULL;
}


More information about the Insight-users mailing list