diff options
| author | Guido van Rossum <guido@python.org> | 1990-12-20 15:06:42 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1990-12-20 15:06:42 +0000 |
| commit | 3f5da24ea304e674a9abbdcffc4d671e32aa70f1 (patch) | |
| tree | e932e31cb9381f40b7c87c377638216c043b5cfc /Include/tupleobject.h | |
| parent | 226d79eb4a776dd54c9e4544b17deaf928bcef3a (diff) | |
| download | cpython-git-3f5da24ea304e674a9abbdcffc4d671e32aa70f1.tar.gz | |
"Compiling" version
Diffstat (limited to 'Include/tupleobject.h')
| -rw-r--r-- | Include/tupleobject.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/tupleobject.h b/Include/tupleobject.h index d22e6b974d..46a003135d 100644 --- a/Include/tupleobject.h +++ b/Include/tupleobject.h @@ -14,6 +14,11 @@ inserted in the tuple. Similarly, gettupleitem does not increment the returned item's reference count. */ +typedef struct { + OB_VARHEAD + object *ob_item[1]; +} tupleobject; + extern typeobject Tupletype; #define is_tupleobject(op) ((op)->ob_type == &Tupletype) @@ -22,3 +27,6 @@ extern object *newtupleobject PROTO((int size)); extern int gettuplesize PROTO((object *)); extern object *gettupleitem PROTO((object *, int)); extern int settupleitem PROTO((object *, int, object *)); + +/* Macro, trading safety for speed */ +#define GETTUPLEITEM(op, i) ((op)->ob_item[i]) |
