Commit 28c35f43 authored by Stefan Behnel's avatar Stefan Behnel

Change the declaration of PyFloat_FromString to the Py3 signature and provide a fallback for Py2.

Closes https://github.com/cython/cython/issues/3909
parent 70be8d1b
cdef extern from "Python.h":
"""
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj)
#else
#define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL)
#endif
"""
############################################################################
# 7.2.3
......@@ -21,7 +28,7 @@ cdef extern from "Python.h":
# Return true if its argument is a PyFloatObject, but not a
# subtype of PyFloatObject.
object PyFloat_FromString(object str, char **pend)
object PyFloat_FromString "__Pyx_PyFloat_FromString" (object str)
# Return value: New reference.
# Create a PyFloatObject object based on the string value in str,
# or NULL on failure. The pend argument is ignored. It remains
......
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