summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2013-10-06 11:52:53 +0200
committerStefan Behnel <stefan_ml@behnel.de>2013-10-06 11:52:53 +0200
commitf8233ea5f563630192b180e29832e1a571705e21 (patch)
tree54d743775f4fb905e3fca2824b878274628b6167 /Cython/Utility/ModuleSetupCode.c
parent9e3a2d7ae9fce31bfbba19f39fc882e6ded78462 (diff)
downloadcython-f8233ea5f563630192b180e29832e1a571705e21.tar.gz
extend semantics of 'basestring' typed variables to represent exactly bytes/str/unicode but no subtypes
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index bdc4c3e9a..df0e6b285 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -186,7 +186,7 @@
#else
#define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
PyString_Check(obj) || PyUnicode_Check(obj))
- #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type)
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if PY_VERSION_HEX < 0x02060000