From: Jeff B <jeffb42@ho...> - 2005-11-25 20:12:47
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, but I have a need to interface with a legacy function which takes a
Right now, if I have a C function which takes a pointer to an int, I have in
my Swig .i file:
extern void PointerTest(int* pnValue);
...but I have a function which takes a handle (a pointer-to-a-pointer):
extern void HandleTest(int** ppnValue);
...and I'm at a bit of a loss as to what to do.
(BTW: The function I need to call actually takes a Handle of a structure, so
if it was called in C it would be:
MyStruct* pData = NULL;
CreateMyStruct(&pData); // pData is allocated within CreateMyStruct()
but my example above uses ints because that's a simple type).
Get latest updates about Open Source Projects, Conferences and News.