-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtuple.v
26 lines (22 loc) · 1.17 KB
/
tuple.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module py
/*
tupleobject.h
Another generally useful object type is a tuple of object pointers.
For Python, this is an immutable type. C code can change the tuple items
(but not their number), and even use tuples as general-purpose arrays of
object references, but in general only brand new tuples should be mutated,
not ones that might already have been exposed to Python code.
*** WARNING *** PyTuple_SetItem does not increment the new item's reference
count, but does decrement the reference count of the item it replaces,
if not nil. It does *decrement* the reference count if it is *not*
inserted in the tuple. Similarly, PyTuple_GetItem does not increment the
returned item's reference count.
*/
pub fn C.PyTuple_Check(&C.PyObject) int
pub fn C.PyTuple_CheckExact(&C.PyObject) int
pub fn C.PyTuple_New(&C.Py_ssize_t) &C.PyObject
pub fn C.PyTuple_Size(&C.PyObject) &C.Py_ssize_t
pub fn C.PyTuple_GetItem(&C.PyObject, &C.Py_ssize_t) &C.PyObject
pub fn C.PyTuple_SetItem(&C.PyObject, &C.Py_ssize_t, &C.PyObject) int
pub fn C.PyTuple_GetSlice(&C.PyObject, &C.Py_ssize_t, &C.Py_ssize_t) &C.PyObject
pub fn C.PyTuple_Pack(&C.Py_ssize_t, ...&&C.PyObject) &C.PyObject