diff options
author | scoder <stefan_ml@behnel.de> | 2018-08-11 08:59:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-11 08:59:03 +0200 |
commit | 0da92b56fb65ef6aa82df00ea4abcfd5ccb82005 (patch) | |
tree | b1c230f30f338dabf7f41179f2723884396fb733 /Cython/Utility/ModuleSetupCode.c | |
parent | 0f3ec28f26161042fa8fd6a93b9c503f23139539 (diff) | |
parent | fb15825299fd74733440d1700ff932463964682b (diff) | |
download | cython-0da92b56fb65ef6aa82df00ea4abcfd5ccb82005.tar.gz |
Merge pull request #2537 from jakirkham/extern_py_raw_mem
Add Python Raw memory helper functions
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 55c379904..d7f8cb053 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -439,6 +439,12 @@ class __Pyx_FakeReference { #define PyObject_Realloc(p) PyMem_Realloc(p) #endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif + #if CYTHON_COMPILING_IN_PYSTON // special C-API functions only in Pyston #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) |