diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2012-02-24 11:57:54 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2012-02-24 11:57:54 +0100 |
commit | 5a31a3d8d38d9d266886916432f1ebe621a2bc69 (patch) | |
tree | 8a4cd36784a884f640a05ed5aa32947bd155be4b /Cython/Utility/ModuleSetupCode.c | |
parent | e2512eaed1426ebe3146b906a5c4f1b5f0b5f56b (diff) | |
download | cython-5a31a3d8d38d9d266886916432f1ebe621a2bc69.tar.gz |
fix public C-APIs: was missing macro definition of __Pyx_PyIdentifier_FromString()
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index b0777b76b..413d8a7b0 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -83,12 +83,10 @@ #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif @@ -369,3 +367,14 @@ static int __Pyx_check_binary_version(void) { } return 0; } + +/////////////// PyIdentifierFromString.proto /////////////// + +#if !defined(__Pyx_PyIdentifier_FromString) +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) +#else + #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) +#endif +#endif + |