Expose mutable C++ object (float) to boost python -
i expose float object c++ code, boost python module. current attempt looks this:
float timeinterval = 0.0f; ... boost_python_module(engine) { scope().attr("timeinterval") = object(ptr(&timeinterval)); ... }
i found example here: https://wiki.python.org/moin/boost.python/howto#mutable_c.2b-.2b-_object however, appears used class instances , not primitives? i'm wondering if can expose primitive variable in similar manner , if so, how? tried see if def_readwrite available @ module level, , not.
Comments
Post a Comment