/tags/rel-1-3-24/SWIG/Examples/python/swigrun/example.cxx
# · C++ · 23 lines · 17 code · 5 blank · 1 comment · 3 complexity · 6ff1782bf2acdf20c0a1dace6561b103 MD5 · raw file
- /* File : example.cxx */
- #include <Python.h>
- #include "swigrun.swg"
- #include "pyrun.swg"
- #include "runtime.swg"
- #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;
- }