PageRenderTime 6ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/python/swigrun/example.cxx

#
C++ | 20 lines | 15 code | 4 blank | 1 comment | 3 complexity | d8521b3b4852f90be6e595246a175536 MD5 | raw file
 1/* File : example.cxx */
 2
 3#include <Python.h>
 4#include "swigpyrun.h"
 5#include "example.h"
 6
 7
 8Manager* convert_to_Manager(PyObject *py_obj)
 9{
10  Manager* c_ptr;
11  swig_type_info *ty = SWIG_TypeQuery("Manager *");
12  printf("manager ty %p \n", ty);
13  if (SWIG_ConvertPtr(py_obj, (void **) &c_ptr, ty, 0) == -1) {
14    c_ptr = 0;
15  } else {
16    Py_XINCREF(py_obj);
17  }
18  return c_ptr;
19}
20