Commit 0a3cc077 authored by da-woods's avatar da-woods

Keep __Pyx_NewRef in a macro

parent 337bf7f3
...@@ -466,16 +466,16 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { ...@@ -466,16 +466,16 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
/////////////// pynumber_float.proto /////////////// /////////////// pynumber_float.proto ///////////////
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Float(PyObject* obj); /* proto */ static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj); /* proto */
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))
/////////////// pynumber_float /////////////// /////////////// pynumber_float ///////////////
//@requires: Optimize.c::pybytes_as_double //@requires: Optimize.c::pybytes_as_double
//@requires: Optimize.c::pyunicode_as_double //@requires: Optimize.c::pyunicode_as_double
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Float(PyObject* obj) { static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
if (PyFloat_CheckExact(obj)) { // obj is PyFloat is handled in the calling macro
return __Pyx_NewRef(obj); if (PyUnicode_CheckExact(obj)) {
} else if (PyUnicode_CheckExact(obj)) {
return PyFloat_FromDouble(__Pyx_PyUnicode_AsDouble(obj)); return PyFloat_FromDouble(__Pyx_PyUnicode_AsDouble(obj));
} else if (PyBytes_CheckExact(obj)) { } else if (PyBytes_CheckExact(obj)) {
return PyFloat_FromDouble(__Pyx_PyBytes_AsDouble(obj)); return PyFloat_FromDouble(__Pyx_PyBytes_AsDouble(obj));
......
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