Skip to content
Snippets Groups Projects
Unverified Commit 92f17c12 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #219 from jcarpent/devel

Add SWIG support
parents d05963c0 09ca4e45
No related branches found
No related tags found
No related merge requests found
Pipeline #12721 passed with warnings
...@@ -128,6 +128,7 @@ SET(${PROJECT_NAME}_HEADERS ...@@ -128,6 +128,7 @@ SET(${PROJECT_NAME}_HEADERS
include/eigenpy/ufunc.hpp include/eigenpy/ufunc.hpp
include/eigenpy/register.hpp include/eigenpy/register.hpp
include/eigenpy/stride.hpp include/eigenpy/stride.hpp
include/eigenpy/swig.hpp
include/eigenpy/version.hpp include/eigenpy/version.hpp
) )
......
//
// Copyright (c) 2020 INRIA
//
#ifndef __eigenpy_swig_hpp__
#define __eigenpy_swig_hpp__
#include "eigenpy/fwd.hpp"
namespace eigenpy
{
struct PySwigObject
{
PyObject_HEAD
void * ptr;
const char * desc;
};
inline PySwigObject * get_PySwigObject(PyObject * pyObj)
{
if(!PyObject_HasAttrString(pyObj,"this"))
return NULL;
PyObject * this_ptr = PyObject_GetAttrString(pyObj,"this");
if(this_ptr == NULL)
return NULL;
PySwigObject * swig_obj = reinterpret_cast<PySwigObject*>(this_ptr);
return swig_obj;
}
}
#endif // ifndef __eigenpy_swig_hpp__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment