Merge branch 'python'
* python: Define PY_SSIZE_T_CLEAN macro Python: define PY_SSIZE_T_CLEAN Conflicts: CHANGES.current
This commit is contained in:
commit
7f009eddf0
3 changed files with 17 additions and 1 deletions
|
|
@ -7,6 +7,17 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
||||||
Version 4.1.0 (in progress)
|
Version 4.1.0 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2022-05-27: xypron
|
||||||
|
[Python] #2277 Define PY_SSIZE_T_CLEAN macro before #include "Python.h" as
|
||||||
|
recommended in Python 3.7 and later.
|
||||||
|
|
||||||
|
To avoid this macro definition, add the following to your interface file so
|
||||||
|
that SWIG_NO_PY_SSIZE_T_CLEAN is defined at the beginning of the C++ wrappers:
|
||||||
|
|
||||||
|
%begin %{
|
||||||
|
#define SWIG_NO_PY_SSIZE_T_CLEAN
|
||||||
|
%}
|
||||||
|
|
||||||
2022-05-26: rokups
|
2022-05-26: rokups
|
||||||
[C#] #1323 Modify SwigDerivedClassHasMethod for a more efficient director
|
[C#] #1323 Modify SwigDerivedClassHasMethod for a more efficient director
|
||||||
implementation when calling virtual methods that are not overidden.
|
implementation when calling virtual methods that are not overidden.
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,9 @@ As far as I know, this module is C++ safe.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
%wrapper %{
|
%wrapper %{
|
||||||
|
#ifndef SWIG_NO_PY_SSIZE_T_CLEAN
|
||||||
|
#define PY_SSIZE_T_CLEAN
|
||||||
|
#endif
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@
|
||||||
# include <corecrt.h>
|
# include <corecrt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SWIG_NO_PY_SSIZE_T_CLEAN
|
||||||
|
#define PY_SSIZE_T_CLEAN
|
||||||
|
#endif
|
||||||
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
||||||
/* Use debug wrappers with the Python release dll */
|
/* Use debug wrappers with the Python release dll */
|
||||||
# undef _DEBUG
|
# undef _DEBUG
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue