mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Initial revision
This commit is contained in:
parent
c636014c43
commit
85a5fbbdfe
78 changed files with 13589 additions and 0 deletions
26
Include/listobject.h
Normal file
26
Include/listobject.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* List object interface */
|
||||
|
||||
/*
|
||||
123456789-123456789-123456789-123456789-123456789-123456789-123456789-12
|
||||
|
||||
Another generally useful object type is an list of object pointers.
|
||||
This is a mutable type: the list items can be changed, and items can be
|
||||
added or removed. Out-of-range indices or non-list objects are ignored.
|
||||
|
||||
*** WARNING *** setlistitem 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 list. Similarly, getlistitem does not increment the
|
||||
returned item's reference count.
|
||||
*/
|
||||
|
||||
extern typeobject Listtype;
|
||||
|
||||
#define is_listobject(op) ((op)->ob_type == &Listtype)
|
||||
|
||||
extern object *newlistobject PROTO((int size));
|
||||
extern int getlistsize PROTO((object *));
|
||||
extern object *getlistitem PROTO((object *, int));
|
||||
extern int setlistitem PROTO((object *, int, object *));
|
||||
extern int inslistitem PROTO((object *, int, object *));
|
||||
extern int addlistitem PROTO((object *, object *));
|
Loading…
Add table
Add a link
Reference in a new issue