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

    r2 r391  
    77
    88
    9 .. cfunction:: int PySequence_Check(PyObject *o)
     9.. c:function:: int PySequence_Check(PyObject *o)
    1010
    1111   Return ``1`` if the object provides sequence protocol, and ``0`` otherwise.
     
    1313
    1414
    15 .. cfunction:: Py_ssize_t PySequence_Size(PyObject *o)
     15.. c:function:: Py_ssize_t PySequence_Size(PyObject *o)
    1616               Py_ssize_t PySequence_Length(PyObject *o)
    1717
     
    2323
    2424   .. versionchanged:: 2.5
    25       These functions returned an :ctype:`int` type. This might require
    26       changes in your code for properly supporting 64-bit systems.
    27 
    28 
    29 .. cfunction:: PyObject* PySequence_Concat(PyObject *o1, PyObject *o2)
     25      These functions returned an :c:type:`int` type. This might require
     26      changes in your code for properly supporting 64-bit systems.
     27
     28
     29.. c:function:: PyObject* PySequence_Concat(PyObject *o1, PyObject *o2)
    3030
    3131   Return the concatenation of *o1* and *o2* on success, and *NULL* on failure.
     
    3333
    3434
    35 .. cfunction:: PyObject* PySequence_Repeat(PyObject *o, Py_ssize_t count)
     35.. c:function:: PyObject* PySequence_Repeat(PyObject *o, Py_ssize_t count)
    3636
    3737   Return the result of repeating sequence object *o* *count* times, or *NULL* on
     
    3939
    4040   .. versionchanged:: 2.5
    41       This function used an :ctype:`int` type for *count*. This might require
    42       changes in your code for properly supporting 64-bit systems.
    43 
    44 
    45 .. cfunction:: PyObject* PySequence_InPlaceConcat(PyObject *o1, PyObject *o2)
     41      This function used an :c:type:`int` type for *count*. This might require
     42      changes in your code for properly supporting 64-bit systems.
     43
     44
     45.. c:function:: PyObject* PySequence_InPlaceConcat(PyObject *o1, PyObject *o2)
    4646
    4747   Return the concatenation of *o1* and *o2* on success, and *NULL* on failure.
     
    5050
    5151
    52 .. cfunction:: PyObject* PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count)
     52.. c:function:: PyObject* PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count)
    5353
    5454   Return the result of repeating sequence object *o* *count* times, or *NULL* on
     
    5757
    5858   .. versionchanged:: 2.5
    59       This function used an :ctype:`int` type for *count*. This might require
    60       changes in your code for properly supporting 64-bit systems.
    61 
    62 
    63 .. cfunction:: PyObject* PySequence_GetItem(PyObject *o, Py_ssize_t i)
     59      This function used an :c:type:`int` type for *count*. This might require
     60      changes in your code for properly supporting 64-bit systems.
     61
     62
     63.. c:function:: PyObject* PySequence_GetItem(PyObject *o, Py_ssize_t i)
    6464
    6565   Return the *i*\ th element of *o*, or *NULL* on failure. This is the equivalent of
     
    6767
    6868   .. versionchanged:: 2.5
    69       This function used an :ctype:`int` type for *i*. This might require
    70       changes in your code for properly supporting 64-bit systems.
    71 
    72 
    73 .. cfunction:: PyObject* PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2)
     69      This function used an :c:type:`int` type for *i*. This might require
     70      changes in your code for properly supporting 64-bit systems.
     71
     72
     73.. c:function:: PyObject* PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2)
    7474
    7575   Return the slice of sequence object *o* between *i1* and *i2*, or *NULL* on
     
    7777
    7878   .. versionchanged:: 2.5
    79       This function used an :ctype:`int` type for *i1* and *i2*. This might
     79      This function used an :c:type:`int` type for *i1* and *i2*. This might
    8080      require changes in your code for properly supporting 64-bit systems.
    8181
    8282
    83 .. cfunction:: int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v)
     83.. c:function:: int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v)
    8484
    8585   Assign object *v* to the *i*\ th element of *o*.  Returns ``-1`` on failure.  This
     
    8888
    8989   .. versionchanged:: 2.5
    90       This function used an :ctype:`int` type for *i*. This might require
    91       changes in your code for properly supporting 64-bit systems.
    92 
    93 
    94 .. cfunction:: int PySequence_DelItem(PyObject *o, Py_ssize_t i)
     90      This function used an :c:type:`int` type for *i*. This might require
     91      changes in your code for properly supporting 64-bit systems.
     92
     93
     94.. c:function:: int PySequence_DelItem(PyObject *o, Py_ssize_t i)
    9595
    9696   Delete the *i*\ th element of object *o*.  Returns ``-1`` on failure.  This is the
     
    9898
    9999   .. versionchanged:: 2.5
    100       This function used an :ctype:`int` type for *i*. This might require
    101       changes in your code for properly supporting 64-bit systems.
    102 
    103 
    104 .. cfunction:: int PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, PyObject *v)
     100      This function used an :c:type:`int` type for *i*. This might require
     101      changes in your code for properly supporting 64-bit systems.
     102
     103
     104.. c:function:: int PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, PyObject *v)
    105105
    106106   Assign the sequence object *v* to the slice in sequence object *o* from *i1* to
     
    108108
    109109   .. versionchanged:: 2.5
    110       This function used an :ctype:`int` type for *i1* and *i2*. This might
     110      This function used an :c:type:`int` type for *i1* and *i2*. This might
    111111      require changes in your code for properly supporting 64-bit systems.
    112112
    113113
    114 .. cfunction:: int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2)
     114.. c:function:: int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2)
    115115
    116116   Delete the slice in sequence object *o* from *i1* to *i2*.  Returns ``-1`` on
     
    118118
    119119   .. versionchanged:: 2.5
    120       This function used an :ctype:`int` type for *i1* and *i2*. This might
     120      This function used an :c:type:`int` type for *i1* and *i2*. This might
    121121      require changes in your code for properly supporting 64-bit systems.
    122122
    123123
    124 .. cfunction:: Py_ssize_t PySequence_Count(PyObject *o, PyObject *value)
     124.. c:function:: Py_ssize_t PySequence_Count(PyObject *o, PyObject *value)
    125125
    126126   Return the number of occurrences of *value* in *o*, that is, return the number
     
    129129
    130130   .. versionchanged:: 2.5
    131       This function returned an :ctype:`int` type. This might require changes
     131      This function returned an :c:type:`int` type. This might require changes
    132132      in your code for properly supporting 64-bit systems.
    133133
    134134
    135 .. cfunction:: int PySequence_Contains(PyObject *o, PyObject *value)
     135.. c:function:: int PySequence_Contains(PyObject *o, PyObject *value)
    136136
    137137   Determine if *o* contains *value*.  If an item in *o* is equal to *value*,
     
    140140
    141141
    142 .. cfunction:: Py_ssize_t PySequence_Index(PyObject *o, PyObject *value)
     142.. c:function:: Py_ssize_t PySequence_Index(PyObject *o, PyObject *value)
    143143
    144144   Return the first index *i* for which ``o[i] == value``.  On error, return
     
    146146
    147147   .. versionchanged:: 2.5
    148       This function returned an :ctype:`int` type. This might require changes
     148      This function returned an :c:type:`int` type. This might require changes
    149149      in your code for properly supporting 64-bit systems.
    150150
    151151
    152 .. cfunction:: PyObject* PySequence_List(PyObject *o)
     152.. c:function:: PyObject* PySequence_List(PyObject *o)
    153153
    154154   Return a list object with the same contents as the arbitrary sequence *o*.  The
     
    156156
    157157
    158 .. cfunction:: PyObject* PySequence_Tuple(PyObject *o)
     158.. c:function:: PyObject* PySequence_Tuple(PyObject *o)
    159159
    160160   .. index:: builtin: tuple
     
    166166
    167167
    168 .. cfunction:: PyObject* PySequence_Fast(PyObject *o, const char *m)
     168.. c:function:: PyObject* PySequence_Fast(PyObject *o, const char *m)
    169169
    170170   Returns the sequence *o* as a tuple, unless it is already a tuple or list, in
    171    which case *o* is returned.  Use :cfunc:`PySequence_Fast_GET_ITEM` to access the
     171   which case *o* is returned.  Use :c:func:`PySequence_Fast_GET_ITEM` to access the
    172172   members of the result.  Returns *NULL* on failure.  If the object is not a
    173173   sequence, raises :exc:`TypeError` with *m* as the message text.
    174174
    175175
    176 .. cfunction:: PyObject* PySequence_Fast_GET_ITEM(PyObject *o, Py_ssize_t i)
     176.. c:function:: PyObject* PySequence_Fast_GET_ITEM(PyObject *o, Py_ssize_t i)
    177177
    178178   Return the *i*\ th element of *o*, assuming that *o* was returned by
    179    :cfunc:`PySequence_Fast`, *o* is not *NULL*, and that *i* is within bounds.
    180 
    181    .. versionchanged:: 2.5
    182       This function used an :ctype:`int` type for *i*. This might require
    183       changes in your code for properly supporting 64-bit systems.
    184 
    185 
    186 .. cfunction:: PyObject** PySequence_Fast_ITEMS(PyObject *o)
     179   :c:func:`PySequence_Fast`, *o* is not *NULL*, and that *i* is within bounds.
     180
     181   .. versionchanged:: 2.5
     182      This function used an :c:type:`int` type for *i*. This might require
     183      changes in your code for properly supporting 64-bit systems.
     184
     185
     186.. c:function:: PyObject** PySequence_Fast_ITEMS(PyObject *o)
    187187
    188188   Return the underlying array of PyObject pointers.  Assumes that *o* was returned
    189    by :cfunc:`PySequence_Fast` and *o* is not *NULL*.
     189   by :c:func:`PySequence_Fast` and *o* is not *NULL*.
    190190
    191191   Note, if a list gets resized, the reallocation may relocate the items array.
     
    196196
    197197
    198 .. cfunction:: PyObject* PySequence_ITEM(PyObject *o, Py_ssize_t i)
     198.. c:function:: PyObject* PySequence_ITEM(PyObject *o, Py_ssize_t i)
    199199
    200200   Return the *i*\ th element of *o* or *NULL* on failure. Macro form of
    201    :cfunc:`PySequence_GetItem` but without checking that
    202    :cfunc:`PySequence_Check(o)` is true and without adjustment for negative
     201   :c:func:`PySequence_GetItem` but without checking that
     202   :c:func:`PySequence_Check` on *o* is true and without adjustment for negative
    203203   indices.
    204204
     
    206206
    207207   .. versionchanged:: 2.5
    208       This function used an :ctype:`int` type for *i*. This might require
    209       changes in your code for properly supporting 64-bit systems.
    210 
    211 
    212 .. cfunction:: Py_ssize_t PySequence_Fast_GET_SIZE(PyObject *o)
     208      This function used an :c:type:`int` type for *i*. This might require
     209      changes in your code for properly supporting 64-bit systems.
     210
     211
     212.. c:function:: Py_ssize_t PySequence_Fast_GET_SIZE(PyObject *o)
    213213
    214214   Returns the length of *o*, assuming that *o* was returned by
    215    :cfunc:`PySequence_Fast` and that *o* is not *NULL*.  The size can also be
    216    gotten by calling :cfunc:`PySequence_Size` on *o*, but
    217    :cfunc:`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list
     215   :c:func:`PySequence_Fast` and that *o* is not *NULL*.  The size can also be
     216   gotten by calling :c:func:`PySequence_Size` on *o*, but
     217   :c:func:`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list
    218218   or tuple.
Note: See TracChangeset for help on using the changeset viewer.