summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2013-04-25 17:48:14 +0200
committerStefan Behnel <stefan_ml@behnel.de>2013-04-25 17:48:14 +0200
commit38b4649d74ea08b5b86fd49c6f57cf50190d97b3 (patch)
treec0cb2f41932dd3583d582c8a18187b85560ca6d3 /Cython/Utility/ModuleSetupCode.c
parentf72eb8966ac1816279c81c01d721f0d4d795509b (diff)
downloadcython-38b4649d74ea08b5b86fd49c6f57cf50190d97b3.tar.gz
fix 'restrict' usage in g++
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 5bfefdde3..698a1bed0 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -275,6 +275,17 @@
#endif
#endif
+/* restrict */
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else