Command Prompt, Inc.
sipMapCppToSelf

sipMapCppToSelf

Name

sipMapCppToSelf -- Convert a C/C++ pointer to a Python instance

Synopsis

PyObject * sipMapCppToSelf(const void * cppPtr, PyObject * pyClass);

Description

If the C/C++ pointer is recognized, and it is an instance of a sub-class of the expected class, then the previously wrapped instance is returned. Otherwise a new Python instance is created with the expected class. The instance comes with a reference.

Return Value

A pointer to the Python object instance (or Py_None if a NULL pointer was passed in).

cppPtr

A pointer to the C++ object.

pyClass

The expexted Python class.


Powered by Mammoth PostgreSQL
Copyright © 2000-2008 Command Prompt, Inc. All Rights Reserved. All trademarks property of their respective owners.