Mercurial > cpython-lru_cache-weakref
comparison Python/modsupport.c @ 306:c8a979029df4 legacy-trunk
Added getintintintarg() (3 int args)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 01 Jul 1991 18:47:30 +0000 |
| parents | 1ed7f6f65983 |
| children | 2a84b16f91b0 |
comparison
equal
deleted
inserted
replaced
| 305:6b93d4ce8dcb | 306:c8a979029df4 |
|---|---|
| 94 return getintarg(gettupleitem(v, 0), a) && | 94 return getintarg(gettupleitem(v, 0), a) && |
| 95 getintarg(gettupleitem(v, 1), b); | 95 getintarg(gettupleitem(v, 1), b); |
| 96 } | 96 } |
| 97 | 97 |
| 98 int | 98 int |
| 99 getintintintarg(v, a, b, c) | |
| 100 object *v; | |
| 101 int *a; | |
| 102 int *b; | |
| 103 int *c; | |
| 104 { | |
| 105 if (v == NULL || !is_tupleobject(v) || gettuplesize(v) != 3) { | |
| 106 return err_badarg(); | |
| 107 } | |
| 108 return getintarg(gettupleitem(v, 0), a) && | |
| 109 getintarg(gettupleitem(v, 1), b) && | |
| 110 getintarg(gettupleitem(v, 2), c); | |
| 111 } | |
| 112 | |
| 113 int | |
| 99 getlongarg(v, a) | 114 getlongarg(v, a) |
| 100 object *v; | 115 object *v; |
| 101 long *a; | 116 long *a; |
| 102 { | 117 { |
| 103 if (v == NULL || !is_intobject(v)) { | 118 if (v == NULL || !is_intobject(v)) { |
