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

FIx issue related to Python 3.10 (#304)


* cmake: use REQUIRED

* core: fix issue with Python 3.10 and more

* core: fix logic

* core: fix

* core: further fix

* Core: use official solution

Co-authored-by: default avatarGuilhem Saurel <guilhem.saurel@laas.fr>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci



* core: fix

Co-authored-by: default avatarGuilhem Saurel <guilhem.saurel@laas.fr>
Co-authored-by: default avatarpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent 6a586fc1
No related branches found
No related tags found
No related merge requests found
Pipeline #21018 passed with warnings
......@@ -80,7 +80,7 @@ else()
set(PYTHON_COMPONENTS Interpreter Development.Module NumPy)
endif()
set(PYTHON_EXPORT_DEPENDENCY ON)
findpython()
findpython(REQUIRED)
if(WIN32)
link_directories(${PYTHON_LIBRARY_DIRS})
......
/*
* Copyright 2014-2019, CNRS
* Copyright 2018-2019, INRIA
* Copyright 2018-2022, INRIA
*/
#ifndef __eigenpy_memory_hpp__
......@@ -8,6 +8,13 @@
#include "eigenpy/fwd.hpp"
#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_SIZE)
static inline void _Py_SET_SIZE(PyVarObject* ob, Py_ssize_t size) {
ob->ob_size = size;
}
#define Py_SET_SIZE(ob, size) _Py_SET_SIZE((PyVarObject*)(ob), size)
#endif
/**
* This section contains a convenience MACRO which allows an easy specialization
* of Boost Python Object allocator for struct data types containing Eigen
......@@ -66,7 +73,7 @@
reinterpret_cast<Py_ssize_t>(holder) - \
reinterpret_cast<Py_ssize_t>(&instance->storage) + \
static_cast<Py_ssize_t>(offsetof(instance_t, storage)); \
Py_SIZE(instance) = holder_offset; \
Py_SET_SIZE(instance, holder_offset); \
\
protect.cancel(); \
} \
......
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