diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-24 08:50:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-24 08:50:12 +0200 |
commit | d9aed0193b47664af5ec6b92f99fe8cca7f94246 (patch) | |
tree | c1aa628b681ef5c8d924e33194b90f8804dcf9e5 /sources/shiboken2/libshiboken/sbkpython.h | |
parent | b45a890df5bb26c3a4feb8d57dd994fdaaf9c750 (diff) | |
parent | b5a574eaeeb6a4f30794e6012b96f05a3de49217 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ide71a89ef173d6f3e1fa6960f7b15f1fd6cc1bf1
Diffstat (limited to 'sources/shiboken2/libshiboken/sbkpython.h')
-rw-r--r-- | sources/shiboken2/libshiboken/sbkpython.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/sbkpython.h b/sources/shiboken2/libshiboken/sbkpython.h index 28814a68e..610e4a3c7 100644 --- a/sources/shiboken2/libshiboken/sbkpython.h +++ b/sources/shiboken2/libshiboken/sbkpython.h @@ -48,7 +48,13 @@ #if defined(slots) && (defined(__GNUC__) || defined(_MSC_VER) || defined(__clang__)) # pragma push_macro("slots") # undef slots +/* + * Python 2 has function _Py_Mangle directly in Python.h . + * This creates wrong language binding unless we define 'extern "C"' here. + */ +extern "C" { # include <Python.h> +} # include <structmember.h> // Now we have the usual variables from Python.h . # include "python25compat.h" @@ -57,7 +63,9 @@ # include "typespec.h" # pragma pop_macro("slots") #else +extern "C" { # include <Python.h> +} # include <structmember.h> // Now we have the usual variables from Python.h . # include "python25compat.h" |