summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-09-10 14:56:32 (GMT)
committerGuido van Rossum <guido@python.org>1991-09-10 14:56:32 (GMT)
commitc5da35031084ef05a9f0d2fa402586a9ff531f06 (patch)
treed986d71668574cad42d0d092c5720b12a8e4df11 /Python
parent18a372f04ca926e3d0341fadbf33187b3c81cd13 (diff)
downloadcpython-c5da35031084ef05a9f0d2fa402586a9ff531f06.zip
cpython-c5da35031084ef05a9f0d2fa402586a9ff531f06.tar.gz
cpython-c5da35031084ef05a9f0d2fa402586a9ff531f06.tar.bz2
getlonglongargs --> getlonglongarg
Added getlongobjectarg.
Diffstat (limited to 'Python')
-rw-r--r--Python/modsupport.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 2f3fa4b..5d56241 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -123,7 +123,7 @@ getlongarg(v, a)
}
int
-getlonglongargs(v, a, b)
+getlonglongarg(v, a, b)
object *v;
long *a, *b;
{
@@ -135,7 +135,25 @@ getlonglongargs(v, a, b)
}
int
-getlonglongobjectargs(v, a, b, c)
+getlongobjectarg(v, a, b)
+ object *v;
+ long *a;
+ object **b;
+{
+ if (v == NULL || !is_tupleobject(v) || gettuplesize(v) != 2) {
+ return err_badarg();
+ }
+ if (getlongarg(gettupleitem(v, 0), a)) {
+ *b = gettupleitem(v, 1);
+ return 1;
+ }
+ else {
+ return err_badarg();
+ }
+}
+
+int
+getlonglongobjectarg(v, a, b, c)
object *v;
long *a, *b;
object **c;