]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Moved get*doublearg() routines to modsupport.c
authorGuido van Rossum <guido@python.org>
Wed, 3 Apr 1991 19:06:03 +0000 (19:06 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 3 Apr 1991 19:06:03 +0000 (19:06 +0000)
Modules/mathmodule.c

index 7b2bdf288ccd9c5e88ed250ce05842d5b90be41e..f6e72868b4791b306fb7db898ed4174aaa35dde4 100644 (file)
@@ -35,35 +35,6 @@ extern int errno;
 
 #include <math.h>
 
-static int
-getdoublearg(args, px)
-       register object *args;
-       double *px;
-{
-       if (args == NULL)
-               return err_badarg();
-       if (is_floatobject(args)) {
-               *px = getfloatvalue(args);
-               return 1;
-       }
-       if (is_intobject(args)) {
-               *px = getintvalue(args);
-               return 1;
-       }
-       return err_badarg();
-}
-
-static int
-get2doublearg(args, px, py)
-       register object *args;
-       double *px, *py;
-{
-       if (args == NULL || !is_tupleobject(args) || gettuplesize(args) != 2)
-               return err_badarg();
-       return getdoublearg(gettupleitem(args, 0), px) &&
-               getdoublearg(gettupleitem(args, 1), py);
-}
-
 static object *
 math_1(args, func)
        object *args;