From: William S F. <ws...@fu...> - 2006-06-26 22:19:28
|
Dana Hackman wrote: > Greetings all! > > In my swig interface file I have > %module pyTOCR > %include <windows.i> > %include <typemaps.i> > . > . > . > > extern long WINAPI TOCRInitialise(long *INPUT); > ... > > After importing the module and executing: TOCRInitialise(long(1)) > I get the following > > ''' exceptions.TypeError : in method 'TOCRInitialise', argument 1 of type 'long *' ''' > > I have python23 and swig 1.329 VC++6.0 > > Can any help? > Works here and I have the same versions you listed above. There is probably something else in your interface file, try the minimal example I've put below. William /* File : example.i */ %module example %include <windows.i> %include <typemaps.i> %{ #include <windows.h> long WINAPI TOCRInitialise(long *INPUT) { return *INPUT; } %} extern long WINAPI TOCRInitialise(long *INPUT); # file: example.py import example longVal = example.TOCRInitialise(200) print longVal |