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