summaryrefslogtreecommitdiffstats
path: root/Include/listobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-12-20 15:06:42 (GMT)
committerGuido van Rossum <guido@python.org>1990-12-20 15:06:42 (GMT)
commit3f5da24ea304e674a9abbdcffc4d671e32aa70f1 (patch)
treee932e31cb9381f40b7c87c377638216c043b5cfc /Include/listobject.h
parent226d79eb4a776dd54c9e4544b17deaf928bcef3a (diff)
downloadcpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.zip
cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.gz
cpython-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.bz2
"Compiling" version
Diffstat (limited to 'Include/listobject.h')
-rw-r--r--Include/listobject.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/listobject.h b/Include/listobject.h
index 5ff057e..4a2bd72 100644
--- a/Include/listobject.h
+++ b/Include/listobject.h
@@ -14,6 +14,11 @@ inserted in the list. Similarly, getlistitem does not increment the
returned item's reference count.
*/
+typedef struct {
+ OB_VARHEAD
+ object **ob_item;
+} listobject;
+
extern typeobject Listtype;
#define is_listobject(op) ((op)->ob_type == &Listtype)
@@ -25,3 +30,6 @@ extern int setlistitem PROTO((object *, int, object *));
extern int inslistitem PROTO((object *, int, object *));
extern int addlistitem PROTO((object *, object *));
extern int sortlist PROTO((object *));
+
+/* Macro, trading safety for speed */
+#define GETLISTITEM(op, i) ((op)->ob_item[i])