Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/c-api/float.rst

    r2 r391  
    99
    1010
    11 .. ctype:: PyFloatObject
     11.. c:type:: PyFloatObject
    1212
    13    This subtype of :ctype:`PyObject` represents a Python floating point object.
     13   This subtype of :c:type:`PyObject` represents a Python floating point object.
    1414
    1515
    16 .. cvar:: PyTypeObject PyFloat_Type
     16.. c:var:: PyTypeObject PyFloat_Type
    1717
    1818   .. index:: single: FloatType (in modules types)
    1919
    20    This instance of :ctype:`PyTypeObject` represents the Python floating point
     20   This instance of :c:type:`PyTypeObject` represents the Python floating point
    2121   type.  This is the same object as ``float`` and ``types.FloatType``.
    2222
    2323
    24 .. cfunction:: int PyFloat_Check(PyObject *p)
     24.. c:function:: int PyFloat_Check(PyObject *p)
    2525
    26    Return true if its argument is a :ctype:`PyFloatObject` or a subtype of
    27    :ctype:`PyFloatObject`.
     26   Return true if its argument is a :c:type:`PyFloatObject` or a subtype of
     27   :c:type:`PyFloatObject`.
    2828
    2929   .. versionchanged:: 2.2
     
    3131
    3232
    33 .. cfunction:: int PyFloat_CheckExact(PyObject *p)
     33.. c:function:: int PyFloat_CheckExact(PyObject *p)
    3434
    35    Return true if its argument is a :ctype:`PyFloatObject`, but not a subtype of
    36    :ctype:`PyFloatObject`.
     35   Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype of
     36   :c:type:`PyFloatObject`.
    3737
    3838   .. versionadded:: 2.2
    3939
    4040
    41 .. cfunction:: PyObject* PyFloat_FromString(PyObject *str, char **pend)
     41.. c:function:: PyObject* PyFloat_FromString(PyObject *str, char **pend)
    4242
    43    Create a :ctype:`PyFloatObject` object based on the string value in *str*, or
     43   Create a :c:type:`PyFloatObject` object based on the string value in *str*, or
    4444   *NULL* on failure.  The *pend* argument is ignored.  It remains only for
    4545   backward compatibility.
    4646
    4747
    48 .. cfunction:: PyObject* PyFloat_FromDouble(double v)
     48.. c:function:: PyObject* PyFloat_FromDouble(double v)
    4949
    50    Create a :ctype:`PyFloatObject` object from *v*, or *NULL* on failure.
     50   Create a :c:type:`PyFloatObject` object from *v*, or *NULL* on failure.
    5151
    5252
    53 .. cfunction:: double PyFloat_AsDouble(PyObject *pyfloat)
     53.. c:function:: double PyFloat_AsDouble(PyObject *pyfloat)
    5454
    55    Return a C :ctype:`double` representation of the contents of *pyfloat*.  If
     55   Return a C :c:type:`double` representation of the contents of *pyfloat*.  If
    5656   *pyfloat* is not a Python floating point object but has a :meth:`__float__`
    5757   method, this method will first be called to convert *pyfloat* into a float.
     58   This method returns ``-1.0`` upon failure, so one should call
     59   :c:func:`PyErr_Occurred` to check for errors.
    5860
    5961
    60 .. cfunction:: double PyFloat_AS_DOUBLE(PyObject *pyfloat)
     62.. c:function:: double PyFloat_AS_DOUBLE(PyObject *pyfloat)
    6163
    62    Return a C :ctype:`double` representation of the contents of *pyfloat*, but
     64   Return a C :c:type:`double` representation of the contents of *pyfloat*, but
    6365   without error checking.
    6466
    6567
    66 .. cfunction:: PyObject* PyFloat_GetInfo(void)
     68.. c:function:: PyObject* PyFloat_GetInfo(void)
    6769
    6870   Return a structseq instance which contains information about the
     
    7375
    7476
    75 .. cfunction:: double PyFloat_GetMax()
     77.. c:function:: double PyFloat_GetMax()
    7678
    77    Return the maximum representable finite float *DBL_MAX* as C :ctype:`double`.
     79   Return the maximum representable finite float *DBL_MAX* as C :c:type:`double`.
    7880
    7981   .. versionadded:: 2.6
    8082
    8183
    82 .. cfunction:: double PyFloat_GetMin()
     84.. c:function:: double PyFloat_GetMin()
    8385
    84    Return the minimum normalized positive float *DBL_MIN* as C :ctype:`double`.
     86   Return the minimum normalized positive float *DBL_MIN* as C :c:type:`double`.
    8587
    8688   .. versionadded:: 2.6
    8789
    8890
    89 .. cfunction:: int PyFloat_ClearFreeList()
     91.. c:function:: int PyFloat_ClearFreeList()
    9092
    9193   Clear the float free list. Return the number of items that could not
     
    9395
    9496   .. versionadded:: 2.6
     97
     98
     99.. c:function:: void PyFloat_AsString(char *buf, PyFloatObject *v)
     100
     101   Convert the argument *v* to a string, using the same rules as
     102   :func:`str`. The length of *buf* should be at least 100.
     103
     104   This function is unsafe to call because it writes to a buffer whose
     105   length it does not know.
     106
     107   .. deprecated:: 2.7
     108      Use :func:`PyObject_Str` or :func:`PyOS_double_to_string` instead.
     109
     110
     111.. c:function:: void PyFloat_AsReprString(char *buf, PyFloatObject *v)
     112
     113   Same as PyFloat_AsString, except uses the same rules as
     114   :func:`repr`.  The length of *buf* should be at least 100.
     115
     116   This function is unsafe to call because it writes to a buffer whose
     117   length it does not know.
     118
     119   .. deprecated:: 2.7
     120      Use :func:`PyObject_Repr` or :func:`PyOS_double_to_string` instead.
Note: See TracChangeset for help on using the changeset viewer.