summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2013-08-30 09:03:15 +0200
committerStefan Behnel <stefan_ml@behnel.de>2013-08-30 09:03:15 +0200
commit5c6fe1440312853fe4c259778c803198a70536d2 (patch)
tree36d6dfb8de017a1563819c498bfa530e2c7501ab /Cython/Utility/ModuleSetupCode.c
parenta6332d43e3e52ba8d068d92b424b67c2af2946bf (diff)
downloadcython-5c6fe1440312853fe4c259778c803198a70536d2.tar.gz
PyPy doesn't define Py_OptimizeFlag => always set it to off to enable assertions
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 8065ab9c5..c76affdd9 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -40,6 +40,10 @@
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
+#if CYTHON_COMPILING_IN_PYPY
+#define Py_OptimizeFlag 0
+#endif
+
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX