[vtkusers] vtkWrapPython and function-pointers

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Oct 31 07:51:35 EST 2005


Jens,

Use the vtkWrap* exclude tags in your header file:

//BTX
SetGridLoadingFeedback( void (*GridFeedbackFunc)(void *) );
//ETX

Mathieu

Jens wrote:
> I just read this article:
> http://www.swig.org/Doc1.1/HTML/Python.html#n11
> It seems not to be that easy. 
> 
> Does anybody has an idea how to exclude a function from getting wrapped by 
> vtkWrapPython so that no error occurs?
> 
> 	Greeting
> 		Jens
> 
> Am Montag, 31. Oktober 2005 13:08 schrieb Jens:
> 
>>Hi
>>I´m developing a new reader class for vtk and would like to be able to wrap
>>it for python, too.
>>Starting with the class vtkLocal it worked fine until I added the following
>>function definition in the header file:
>>
>>SetGridLoadingFeedback( void (*GridFeedbackFunc)(const int) );
>>
>>The class still compiles without errors but cannot get wrapped using
>>Vtk/bin/vtkWrapPython.
>>
>>Changing the function definition to
>>SetGridLoadingFeedback( void (*GridFeedbackFunc)(void *) );
>>removes the error, but I want an "const int" and no "void*" as function
>>argument.
>>
>>Does anybody knows if this is a python related restriction or what I could
>>do?
>>
>>Greetings
>>	Jens
>>_______________________________________________
>>This is the private VTK discussion list.
>>Please keep messages on-topic. Check the FAQ at:
>>http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 




More information about the vtkusers mailing list