/trunk/Examples/python/swigrun/example.cxx
C++ | 20 lines | 15 code | 4 blank | 1 comment | 3 complexity | d8521b3b4852f90be6e595246a175536 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- /* 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 %p \n", ty);
- if (SWIG_ConvertPtr(py_obj, (void **) &c_ptr, ty, 0) == -1) {
- c_ptr = 0;
- } else {
- Py_XINCREF(py_obj);
- }
- return c_ptr;
- }