swig.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 INRIA
3 //
4 
5 #ifndef __eigenpy_swig_hpp__
6 #define __eigenpy_swig_hpp__
7 
8 #include "eigenpy/fwd.hpp"
9 
10 namespace eigenpy {
11 struct PySwigObject {
12  PyObject_HEAD void* ptr;
13  const char* desc;
14 };
15 
16 inline PySwigObject* get_PySwigObject(PyObject* pyObj) {
17  if (!PyObject_HasAttrString(pyObj, "this")) return NULL;
18 
19  PyObject* this_ptr = PyObject_GetAttrString(pyObj, "this");
20  if (this_ptr == NULL) return NULL;
21  PySwigObject* swig_obj = reinterpret_cast<PySwigObject*>(this_ptr);
22 
23  return swig_obj;
24 }
25 } // namespace eigenpy
26 
27 #endif // ifndef __eigenpy_swig_hpp__
PySwigObject * get_PySwigObject(PyObject *pyObj)
Definition: swig.hpp:16
PyObject_HEAD void * ptr
Definition: swig.hpp:12
const char * desc
Definition: swig.hpp:13


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Jun 2 2023 02:10:26