1 cdef extern from "Python.h":
3 ############################################################################
5 ############################################################################
8 # This subtype of PyObject represents a Python floating point object.
10 # PyTypeObject PyFloat_Type
12 # This instance of PyTypeObject represents the Python floating
13 # point type. This is the same object as float and
16 bint PyFloat_Check(object p)
17 # Return true if its argument is a PyFloatObject or a subtype of
20 bint PyFloat_CheckExact(object p)
21 # Return true if its argument is a PyFloatObject, but not a
22 # subtype of PyFloatObject.
24 object PyFloat_FromString(object str, char **pend)
25 # Return value: New reference.
26 # Create a PyFloatObject object based on the string value in str,
27 # or NULL on failure. The pend argument is ignored. It remains
28 # only for backward compatibility.
30 object PyFloat_FromDouble(double v)
31 # Return value: New reference.
32 # Create a PyFloatObject object from v, or NULL on failure.
34 double PyFloat_AsDouble(object pyfloat) except? -1
35 # Return a C double representation of the contents of pyfloat.
37 double PyFloat_AS_DOUBLE(object pyfloat)
38 # Return a C double representation of the contents of pyfloat, but
39 # without error checking.