]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
getlonglongargs --> getlonglongarg
authorGuido van Rossum <guido@python.org>
Tue, 10 Sep 1991 14:56:32 +0000 (14:56 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 10 Sep 1991 14:56:32 +0000 (14:56 +0000)
Added getlongobjectarg.

Python/modsupport.c

index 2f3fa4b2cca63cbc9b5a36f3b85b91bcb0b60b66..5d56241e2736dbe2fdb3e3d146079214f0d2bf9e 100644 (file)
@@ -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;