eigenpy
3.12.0
Bindings between Numpy and Eigen using Boost.Python
Loading...
Searching...
No Matches
swig.hpp
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__
eigenpy
Definition
alignment.hpp:14
eigenpy::PySwigObject
Definition
swig.hpp:11
include
eigenpy
swig.hpp
Generated by
1.14.0