diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2014-10-09 08:06:02 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2014-10-09 08:06:02 +0200 |
commit | 5968096a717a47e2b015bf9b31b22581108aa529 (patch) | |
tree | 8a5bf9d94831b07c515f073a8219a3c676c5d2d7 | |
parent | 55d87d498ef281f1a5e66c3d2c07f2e09f0cbcef (diff) | |
download | cython-5968096a717a47e2b015bf9b31b22581108aa529.tar.gz |
work around pypy3 bug
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 51bb02969..47fc89216 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -62,9 +62,6 @@ #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_CHECKTYPES 0 #define Py_TPFLAGS_HAVE_INDEX 0 -#endif - -#if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif @@ -158,6 +155,12 @@ #define PyBoolObject PyLongObject #endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif + #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong |