From: Schulz, J. (EZTV) <jen...@vo...> - 2006-02-01 14:01:18
|
I'm new to Swig, and I undstand that if I have a C function which takes a pointer, I need to include cpointer.i and use pointer_functions() in my Swig *.i file. My problem is that I can't use pointer_function in tcl. I wrote 2 files. The file vutiapi.h has the following body: int16 MBOPEN(int16 *p_mbid, int16 *p_isiz, int32 *p_evnt); int16 MBCLOS(int16 *p_mbid); int16 MBRECV(int16 *p_mbid, int16 *p_buff); int16 MBRCVW(int16 *p_mbid, int16 *p_buff); int16 MBSEND(int16 *p_buff); int16 MBSNDW(int16 *p_buff); and my interface file has the folloing body: /* File : vutiapi_tcl.i*/ %module vutiapi_tcl %{ #include <std.h> #include <pagdim.h> #include <pag.h> #include <pab.h> #include <pabstb.h> #include <pagntr.h> #include <pagcnh.h> #include <pagsuw.h> #include <suwdef.h> #include "vutiapi.h" %} %include "vutiapi.h" %include cpointer.i %pointer_functions(int16, int16p); %pointer_functions(int32, int32p); But if I load the generated DLL in TCL I can't use the pointerfunctions. Know anybody how I have to use this module??? Thanks |