Define PY_SSIZE_T_CLEAN macro
before #include "Python.h" as recommended in Python 3.7 and later. Issue #2277
This commit is contained in:
parent
ca6a73277b
commit
abc8e0bb27
3 changed files with 13 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ As far as I know, this module is C++ safe.
|
|||
#endif
|
||||
|
||||
%wrapper %{
|
||||
#ifndef PY_SSIZE_T_CLEAN
|
||||
#ifndef SWIG_NO_PY_SSIZE_T_CLEAN
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#endif
|
||||
#include <Python.h>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
# include <corecrt.h>
|
||||
#endif
|
||||
|
||||
#ifndef PY_SSIZE_T_CLEAN
|
||||
#ifndef SWIG_NO_PY_SSIZE_T_CLEAN
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#endif
|
||||
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue