From: Sam P. <the...@gm...> - 2012-07-23 21:03:13
|
I would like be able to obtain the raw pointer value of an object in swig. Is this possible? I can't find any documenation about it. C++ struct apple { int seeds[10]; } python import my_module a = my_module.apple p = a.seeds.get_pointer() #Does something like this exist? import ctypes class py_array(ctypes.Structure): __fields__ = [('seeds',ctypes.uint_32)] myarray = py_array.from_address( p) -- Thank you, Sam Price |