Home | History | Annotate | Download | only in cpython
      1 cdef extern from "Python.h":
      2 
      3     ############################################################################
      4     # 7.2.3
      5     ############################################################################
      6     # PyFloatObject
      7     #
      8     # This subtype of PyObject represents a Python floating point object.
      9 
     10     # PyTypeObject PyFloat_Type
     11     #
     12     # This instance of PyTypeObject represents the Python floating
     13     # point type. This is the same object as float and
     14     # types.FloatType.
     15 
     16     bint PyFloat_Check(object p)
     17     # Return true if its argument is a PyFloatObject or a subtype of
     18     # PyFloatObject.
     19 
     20     bint PyFloat_CheckExact(object p)
     21     # Return true if its argument is a PyFloatObject, but not a
     22     # subtype of PyFloatObject.
     23 
     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.
     29 
     30     object PyFloat_FromDouble(double v)
     31     # Return value: New reference.
     32     # Create a PyFloatObject object from v, or NULL on failure.
     33 
     34     double PyFloat_AsDouble(object pyfloat) except? -1
     35     # Return a C double representation of the contents of pyfloat.
     36 
     37     double PyFloat_AS_DOUBLE(object pyfloat)
     38     # Return a C double representation of the contents of pyfloat, but
     39     # without error checking.
     40