Py_BuildValue

JB jblazi at hotmail.com
Thu Dec 12 17:20:31 EST 2002


I should like to extend Python with a C++ function.

Let us suppose I have apointer some C++ structure:

CObject *p = new CObject(...)

I should want to pass this pointer to Python and my C++ 
extension module would provide functions that deal with the 
object the pointer points to.

Is calling
Py_BuildValue("O",p)
the right way of doing this?

TIA, 
-- 
JB



More information about the Python-list mailing list