[C++-sig] How to use BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID ?
William Marié
william.marie at gmail.com
Thu Sep 18 14:21:38 CEST 2008
Hi,
I would need to create an opaque boost python type, i had a look on the
internet, here is what i found for instance to declare a void* opaque type :
struct void_ {};
BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(void_);
This works well if you have to call C++ function from Python but how do i do
if i want to call a python function from C++ with a void* parameter :
ex :
void* pFoo = 0x78985465;
object callable = ....;
callable( (void_*)pFoo );
I can't find out how to make this work properly i always have a runtime
error :
TypeError: No to_python (by-value) converter found for C++ type: struct
void_ *
Thanks for your help
William
--
View this message in context: http://www.nabble.com/How-to-use-BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID---tp19551601p19551601.html
Sent from the Python - c++-sig mailing list archive at Nabble.com.
More information about the Cplusplus-sig
mailing list