swig/Examples/python/swigrun/example.cxx
Marcelo Matus fbdf160f4a update to use -export-runtime
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7008 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-26 20:24:01 +00:00

20 lines
381 B
C++

/* File : example.cxx */
#include <Python.h>
#include "swigpyrun.h"
#include "example.h"
Manager* convert_to_Manager(PyObject *py_obj)
{
Manager* c_ptr;
swig_type_info *ty = SWIG_TypeQuery("Manager *");
printf("manager ty %x \n", ty);
if (SWIG_ConvertPtr(py_obj, (void **) &c_ptr, ty, 0) == -1) {
c_ptr = 0;
} else {
Py_XINCREF(py_obj);
}
return c_ptr;
}