/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1/* File : example.cxx */ 2 3#include <Python.h> 4#include "swigrun.swg" 5#include "pyrun.swg" 6#include "runtime.swg" 7 8#include "example.h" 9 10 11Manager* convert_to_Manager(PyObject *py_obj) 12{ 13 Manager* c_ptr; 14 swig_type_info *ty = SWIG_TypeQuery("Manager *"); 15 printf("manager ty %x \n", ty); 16 if (SWIG_ConvertPtr(py_obj, (void **) &c_ptr, ty, 0) == -1) { 17 c_ptr = 0; 18 } else { 19 Py_XINCREF(py_obj); 20 } 21 return c_ptr; 22} 23