Python: define PY_SSIZE_T_CLEAN
It is recommended to always define PY_SSIZE_T_CLEAN before including Python.h. Cf. https://docs.python.org/3/c-api/intro.html This avoids errors like: SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
6939d91e4c
commit
ca6a73277b
2 changed files with 6 additions and 1 deletions
|
|
@ -29,7 +29,9 @@ As far as I know, this module is C++ safe.
|
|||
#endif
|
||||
|
||||
%wrapper %{
|
||||
|
||||
#ifndef PY_SSIZE_T_CLEAN
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#endif
|
||||
#include <Python.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue