summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2015-04-10 22:01:44 +0200
committerStefan Behnel <stefan_ml@behnel.de>2015-04-10 22:01:44 +0200
commit8d707e05dfb9a9cd4e954f4f00bb2510f30ea84e (patch)
tree608e5a60914b692744ebd873732827535622ead0 /Cython/Utility/ModuleSetupCode.c
parent35acc9d6305de9d38d3863843f0779a5674e4c5f (diff)
downloadcython-8d707e05dfb9a9cd4e954f4f00bb2510f30ea84e.tar.gz
switch to using PySet_GET_SIZE() for set size and truth requests as it's fast and also works as expected in PyPy
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 4b77a4bf6..141a11739 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -100,13 +100,10 @@
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
- // PyPy doesn't handle frozenset() in PySet_Size()
- #define __Pyx_PyFrozenSet_Size(s) PyObject_Size(s)
#else
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
- #define __Pyx_PyFrozenSet_Size(s) PySet_Size(s)
#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))