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/int.rst

    r2 r391  
    99
    1010
    11 .. ctype:: PyIntObject
     11.. c:type:: PyIntObject
    1212
    13    This subtype of :ctype:`PyObject` represents a Python integer object.
     13   This subtype of :c:type:`PyObject` represents a Python integer object.
    1414
    1515
    16 .. cvar:: PyTypeObject PyInt_Type
     16.. c:var:: PyTypeObject PyInt_Type
    1717
    1818   .. index:: single: IntType (in modules types)
    1919
    20    This instance of :ctype:`PyTypeObject` represents the Python plain integer type.
     20   This instance of :c:type:`PyTypeObject` represents the Python plain integer type.
    2121   This is the same object as ``int`` and ``types.IntType``.
    2222
    2323
    24 .. cfunction:: int PyInt_Check(PyObject *o)
     24.. c:function:: int PyInt_Check(PyObject *o)
    2525
    26    Return true if *o* is of type :cdata:`PyInt_Type` or a subtype of
    27    :cdata:`PyInt_Type`.
     26   Return true if *o* is of type :c:data:`PyInt_Type` or a subtype of
     27   :c:data:`PyInt_Type`.
    2828
    2929   .. versionchanged:: 2.2
     
    3131
    3232
    33 .. cfunction:: int PyInt_CheckExact(PyObject *o)
     33.. c:function:: int PyInt_CheckExact(PyObject *o)
    3434
    35    Return true if *o* is of type :cdata:`PyInt_Type`, but not a subtype of
    36    :cdata:`PyInt_Type`.
     35   Return true if *o* is of type :c:data:`PyInt_Type`, but not a subtype of
     36   :c:data:`PyInt_Type`.
    3737
    3838   .. versionadded:: 2.2
    3939
    4040
    41 .. cfunction:: PyObject* PyInt_FromString(char *str, char **pend, int base)
     41.. c:function:: PyObject* PyInt_FromString(char *str, char **pend, int base)
    4242
    43    Return a new :ctype:`PyIntObject` or :ctype:`PyLongObject` based on the string
     43   Return a new :c:type:`PyIntObject` or :c:type:`PyLongObject` based on the string
    4444   value in *str*, which is interpreted according to the radix in *base*.  If
    4545   *pend* is non-*NULL*, ``*pend`` will point to the first character in *str* which
     
    5050   must be between ``2`` and ``36``, inclusive.  Leading spaces are ignored.  If
    5151   there are no digits, :exc:`ValueError` will be raised.  If the string represents
    52    a number too large to be contained within the machine's :ctype:`long int` type
    53    and overflow warnings are being suppressed, a :ctype:`PyLongObject` will be
     52   a number too large to be contained within the machine's :c:type:`long int` type
     53   and overflow warnings are being suppressed, a :c:type:`PyLongObject` will be
    5454   returned.  If overflow warnings are not being suppressed, *NULL* will be
    5555   returned in this case.
    5656
    5757
    58 .. cfunction:: PyObject* PyInt_FromLong(long ival)
     58.. c:function:: PyObject* PyInt_FromLong(long ival)
    5959
    6060   Create a new integer object with a value of *ival*.
     
    6767
    6868
    69 .. cfunction:: PyObject* PyInt_FromSsize_t(Py_ssize_t ival)
     69.. c:function:: PyObject* PyInt_FromSsize_t(Py_ssize_t ival)
    7070
    7171   Create a new integer object with a value of *ival*. If the value is larger
     
    7676
    7777
    78 .. cfunction:: PyObject* PyInt_FromSize_t(size_t ival)
     78.. c:function:: PyObject* PyInt_FromSize_t(size_t ival)
    7979
    8080   Create a new integer object with a value of *ival*. If the value exceeds
     
    8484
    8585
    86 .. cfunction:: long PyInt_AsLong(PyObject *io)
     86.. c:function:: long PyInt_AsLong(PyObject *io)
    8787
    88    Will first attempt to cast the object to a :ctype:`PyIntObject`, if it is not
     88   Will first attempt to cast the object to a :c:type:`PyIntObject`, if it is not
    8989   already one, and then return its value. If there is an error, ``-1`` is
    9090   returned, and the caller should check ``PyErr_Occurred()`` to find out whether
     
    9292
    9393
    94 .. cfunction:: long PyInt_AS_LONG(PyObject *io)
     94.. c:function:: long PyInt_AS_LONG(PyObject *io)
    9595
    9696   Return the value of the object *io*.  No error checking is performed.
    9797
    9898
    99 .. cfunction:: unsigned long PyInt_AsUnsignedLongMask(PyObject *io)
     99.. c:function:: unsigned long PyInt_AsUnsignedLongMask(PyObject *io)
    100100
    101    Will first attempt to cast the object to a :ctype:`PyIntObject` or
    102    :ctype:`PyLongObject`, if it is not already one, and then return its value as
     101   Will first attempt to cast the object to a :c:type:`PyIntObject` or
     102   :c:type:`PyLongObject`, if it is not already one, and then return its value as
    103103   unsigned long.  This function does not check for overflow.
    104104
     
    106106
    107107
    108 .. cfunction:: unsigned PY_LONG_LONG PyInt_AsUnsignedLongLongMask(PyObject *io)
     108.. c:function:: unsigned PY_LONG_LONG PyInt_AsUnsignedLongLongMask(PyObject *io)
    109109
    110    Will first attempt to cast the object to a :ctype:`PyIntObject` or
    111    :ctype:`PyLongObject`, if it is not already one, and then return its value as
     110   Will first attempt to cast the object to a :c:type:`PyIntObject` or
     111   :c:type:`PyLongObject`, if it is not already one, and then return its value as
    112112   unsigned long long, without checking for overflow.
    113113
     
    115115
    116116
    117 .. cfunction:: Py_ssize_t PyInt_AsSsize_t(PyObject *io)
     117.. c:function:: Py_ssize_t PyInt_AsSsize_t(PyObject *io)
    118118
    119    Will first attempt to cast the object to a :ctype:`PyIntObject` or
    120    :ctype:`PyLongObject`, if it is not already one, and then return its value as
    121    :ctype:`Py_ssize_t`.
     119   Will first attempt to cast the object to a :c:type:`PyIntObject` or
     120   :c:type:`PyLongObject`, if it is not already one, and then return its value as
     121   :c:type:`Py_ssize_t`.
    122122
    123123   .. versionadded:: 2.5
    124124
    125125
    126 .. cfunction:: long PyInt_GetMax()
     126.. c:function:: long PyInt_GetMax()
    127127
    128128   .. index:: single: LONG_MAX
     
    132132
    133133
    134 .. cfunction:: int PyInt_ClearFreeList()
     134.. c:function:: int PyInt_ClearFreeList()
    135135
    136136   Clear the integer free list. Return the number of items that could not
Note: See TracChangeset for help on using the changeset viewer.