Changeset 391 for python/trunk/Doc/c-api/tuple.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/c-api/tuple.rst
r2 r391 9 9 10 10 11 .. c type:: PyTupleObject11 .. c:type:: PyTupleObject 12 12 13 This subtype of :c type:`PyObject` represents a Python tuple object.13 This subtype of :c:type:`PyObject` represents a Python tuple object. 14 14 15 15 16 .. c var:: PyTypeObject PyTuple_Type16 .. c:var:: PyTypeObject PyTuple_Type 17 17 18 18 .. index:: single: TupleType (in module types) 19 19 20 This instance of :c type:`PyTypeObject` represents the Python tuple type; it is20 This instance of :c:type:`PyTypeObject` represents the Python tuple type; it is 21 21 the same object as ``tuple`` and ``types.TupleType`` in the Python layer.. 22 22 23 23 24 .. c function:: int PyTuple_Check(PyObject *p)24 .. c:function:: int PyTuple_Check(PyObject *p) 25 25 26 26 Return true if *p* is a tuple object or an instance of a subtype of the tuple … … 31 31 32 32 33 .. c function:: int PyTuple_CheckExact(PyObject *p)33 .. c:function:: int PyTuple_CheckExact(PyObject *p) 34 34 35 35 Return true if *p* is a tuple object, but not an instance of a subtype of the … … 39 39 40 40 41 .. c function:: PyObject* PyTuple_New(Py_ssize_t len)41 .. c:function:: PyObject* PyTuple_New(Py_ssize_t len) 42 42 43 43 Return a new tuple object of size *len*, or *NULL* on failure. 44 44 45 45 .. versionchanged:: 2.5 46 This function used an :c type:`int` type for *len*. This might require46 This function used an :c:type:`int` type for *len*. This might require 47 47 changes in your code for properly supporting 64-bit systems. 48 48 49 49 50 .. c function:: PyObject* PyTuple_Pack(Py_ssize_t n, ...)50 .. c:function:: PyObject* PyTuple_Pack(Py_ssize_t n, ...) 51 51 52 52 Return a new tuple object of size *n*, or *NULL* on failure. The tuple values … … 57 57 58 58 .. versionchanged:: 2.5 59 This function used an :c type:`int` type for *n*. This might require59 This function used an :c:type:`int` type for *n*. This might require 60 60 changes in your code for properly supporting 64-bit systems. 61 61 62 62 63 .. c function:: Py_ssize_t PyTuple_Size(PyObject *p)63 .. c:function:: Py_ssize_t PyTuple_Size(PyObject *p) 64 64 65 65 Take a pointer to a tuple object, and return the size of that tuple. 66 66 67 67 .. versionchanged:: 2.5 68 This function returned an :c type:`int` type. This might require changes68 This function returned an :c:type:`int` type. This might require changes 69 69 in your code for properly supporting 64-bit systems. 70 70 71 71 72 .. c function:: Py_ssize_t PyTuple_GET_SIZE(PyObject *p)72 .. c:function:: Py_ssize_t PyTuple_GET_SIZE(PyObject *p) 73 73 74 74 Return the size of the tuple *p*, which must be non-*NULL* and point to a tuple; … … 76 76 77 77 .. versionchanged:: 2.5 78 This function returned an :c type:`int` type. This might require changes78 This function returned an :c:type:`int` type. This might require changes 79 79 in your code for properly supporting 64-bit systems. 80 80 81 81 82 .. c function:: PyObject* PyTuple_GetItem(PyObject *p, Py_ssize_t pos)82 .. c:function:: PyObject* PyTuple_GetItem(PyObject *p, Py_ssize_t pos) 83 83 84 84 Return the object at position *pos* in the tuple pointed to by *p*. If *pos* is … … 86 86 87 87 .. versionchanged:: 2.5 88 This function used an :c type:`int` type for *pos*. This might require88 This function used an :c:type:`int` type for *pos*. This might require 89 89 changes in your code for properly supporting 64-bit systems. 90 90 91 91 92 .. c function:: PyObject* PyTuple_GET_ITEM(PyObject *p, Py_ssize_t pos)92 .. c:function:: PyObject* PyTuple_GET_ITEM(PyObject *p, Py_ssize_t pos) 93 93 94 Like :c func:`PyTuple_GetItem`, but does no checking of its arguments.94 Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments. 95 95 96 96 .. versionchanged:: 2.5 97 This function used an :c type:`int` type for *pos*. This might require97 This function used an :c:type:`int` type for *pos*. This might require 98 98 changes in your code for properly supporting 64-bit systems. 99 99 100 100 101 .. c function:: PyObject* PyTuple_GetSlice(PyObject *p, Py_ssize_t low, Py_ssize_t high)101 .. c:function:: PyObject* PyTuple_GetSlice(PyObject *p, Py_ssize_t low, Py_ssize_t high) 102 102 103 103 Take a slice of the tuple pointed to by *p* from *low* to *high* and return it … … 105 105 106 106 .. versionchanged:: 2.5 107 This function used an :c type:`int` type for *low* and *high*. This might107 This function used an :c:type:`int` type for *low* and *high*. This might 108 108 require changes in your code for properly supporting 64-bit systems. 109 109 110 110 111 .. c function:: int PyTuple_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o)111 .. c:function:: int PyTuple_SetItem(PyObject *p, Py_ssize_t pos, PyObject *o) 112 112 113 113 Insert a reference to object *o* at position *pos* of the tuple pointed to by … … 119 119 120 120 .. versionchanged:: 2.5 121 This function used an :c type:`int` type for *pos*. This might require121 This function used an :c:type:`int` type for *pos*. This might require 122 122 changes in your code for properly supporting 64-bit systems. 123 123 124 124 125 .. c function:: void PyTuple_SET_ITEM(PyObject *p, Py_ssize_t pos, PyObject *o)125 .. c:function:: void PyTuple_SET_ITEM(PyObject *p, Py_ssize_t pos, PyObject *o) 126 126 127 Like :c func:`PyTuple_SetItem`, but does no error checking, and should *only* be127 Like :c:func:`PyTuple_SetItem`, but does no error checking, and should *only* be 128 128 used to fill in brand new tuples. 129 129 … … 133 133 134 134 .. versionchanged:: 2.5 135 This function used an :c type:`int` type for *pos*. This might require135 This function used an :c:type:`int` type for *pos*. This might require 136 136 changes in your code for properly supporting 64-bit systems. 137 137 138 138 139 .. c function:: int _PyTuple_Resize(PyObject **p, Py_ssize_t newsize)139 .. c:function:: int _PyTuple_Resize(PyObject **p, Py_ssize_t newsize) 140 140 141 141 Can be used to resize a tuple. *newsize* will be the new length of the tuple. … … 154 154 155 155 .. versionchanged:: 2.5 156 This function used an :c type:`int` type for *newsize*. This might156 This function used an :c:type:`int` type for *newsize*. This might 157 157 require changes in your code for properly supporting 64-bit systems. 158 158 159 159 160 .. c function:: int PyTuple_ClearFreeList()160 .. c:function:: int PyTuple_ClearFreeList() 161 161 162 162 Clear the free list. Return the total number of freed items.
Note:
See TracChangeset
for help on using the changeset viewer.