diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2012-03-11 10:15:00 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2012-03-11 10:15:00 +0100 |
commit | 7026837eca3c8e62e05618065f6a53eaaae90faa (patch) | |
tree | 8588ede4ebe17755a94cab64fa6de87b6b9d8921 /Cython/Utility/ModuleSetupCode.c | |
parent | a24894388e11bdb87adeb5ed9d7262d62e70d7ac (diff) | |
download | cython-7026837eca3c8e62e05618065f6a53eaaae90faa.tar.gz |
partial application of some PyPy related changes as far as they are uncontroversial and helpful for further utility code refactorings
--HG--
extra : transplant_source : %F8%87%C7%8B%90w%7E%8EG%04C%A9%89%9B%3E%FB%8CCp%F9
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index e0287daa2..c243175ea 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -28,6 +28,20 @@ #define PY_LONG_LONG LONG_LONG #endif +#ifdef PYPY_VERSION +#define CYTHON_COMPILING_IN_PYPY 1 +#define CYTHON_COMPILING_IN_CPYTHON 0 +#else +#define CYTHON_COMPILING_IN_PYPY 0 +#define CYTHON_COMPILING_IN_CPYTHON 1 +#endif + +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyCFunction_Call PyObject_Call +#else + #define __Pyx_PyCFunction_Call PyCFunction_Call +#endif + #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX |