Commit 45b7c136 authored by Stefan Behnel's avatar Stefan Behnel

move declaration of __Pyx_sst_abs() macro to TypeConversion.c instead of more...

move declaration of __Pyx_sst_abs() macro to TypeConversion.c instead of more high-level ModuleSetupCode.c
parent 9990450e
......@@ -183,18 +183,6 @@
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
// fast and unsafe abs(Py_ssize_t) that ignores the overflow for (-PY_SSIZE_T_MAX-1)
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) \
(sizeof(int) >= sizeof(Py_ssize_t) ? abs(value) : \
(sizeof(long) >= sizeof(Py_ssize_t) ? labs(value) : llabs(value)))
#else
#define __Pyx_sst_abs(value) \
(sizeof(int) >= sizeof(Py_ssize_t) ? abs(value) : \
(sizeof(long) >= sizeof(Py_ssize_t) ? labs(value) : \
((value<0) ? -value : value)))
#endif
/* inline attribute */
#ifndef CYTHON_INLINE
#if defined(__GNUC__)
......
......@@ -13,6 +13,18 @@
(is_signed || likely(v < (type)PY_SSIZE_T_MAX || \
v == (type)PY_SSIZE_T_MAX))) )
// fast and unsafe abs(Py_ssize_t) that ignores the overflow for (-PY_SSIZE_T_MAX-1)
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) \
(sizeof(int) >= sizeof(Py_ssize_t) ? abs(value) : \
(sizeof(long) >= sizeof(Py_ssize_t) ? labs(value) : llabs(value)))
#else
#define __Pyx_sst_abs(value) \
(sizeof(int) >= sizeof(Py_ssize_t) ? abs(value) : \
(sizeof(long) >= sizeof(Py_ssize_t) ? labs(value) : \
((value<0) ? -value : value)))
#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment