diff options
author | Roger E. Masse <rmasse@newcnri.cnri.reston.va.us> | 1996-12-18 21:59:01 (GMT) |
---|---|---|
committer | Roger E. Masse <rmasse@newcnri.cnri.reston.va.us> | 1996-12-18 21:59:01 (GMT) |
commit | 20c6381856a338aede29c349953fe38a197b3c9a (patch) | |
tree | 07c772a67cd2e7be854eb10cc751d075d231ae83 | |
parent | ec0b4af3d4d92c174a421967175672e73189531f (diff) | |
download | cpython-20c6381856a338aede29c349953fe38a197b3c9a.zip cpython-20c6381856a338aede29c349953fe38a197b3c9a.tar.gz cpython-20c6381856a338aede29c349953fe38a197b3c9a.tar.bz2 |
Removed references to getdoublearg and get2doublearg rename macros and
substituted the appropriate PyArg_Parse calls. Retested. All appears well.
-rw-r--r-- | Modules/mathmodule.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 1cf31bd..abf1d5b 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -33,9 +33,6 @@ PERFORMANCE OF THIS SOFTWARE. #include "Python.h" -#define getdoublearg(v, a) PyArg_Parse(v, "d", a) -#define get2doublearg(v, a, b) PyArg_Parse(v, "(dd)", a, b) - #include "mymath.h" #ifndef _MSC_VER @@ -80,7 +77,7 @@ math_1(args, func) double (*func) Py_FPROTO((double)); { double x; - if (!getdoublearg(args, &x)) + if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; x = (*func)(x); @@ -97,7 +94,7 @@ math_2(args, func) double (*func) Py_FPROTO((double, double)); { double x, y; - if (!get2doublearg(args, &x, &y)) + if (! PyArg_Parse(args, "(dd)", &x, &y)) return NULL; errno = 0; x = (*func)(x, y); @@ -156,7 +153,7 @@ math_frexp(self, args) { double x; int i; - if (!getdoublearg(args, &x)) + if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; x = frexp(x, &i); @@ -173,7 +170,7 @@ math_ldexp(self, args) { double x, y; /* Cheat -- allow float as second argument */ - if (!get2doublearg(args, &x, &y)) + if (! PyArg_Parse(args, "(dd)", &x, &y)) return NULL; errno = 0; x = ldexp(x, (int)y); @@ -190,7 +187,7 @@ math_modf(self, args) PyObject *args; { double x, y; - if (!getdoublearg(args, &x)) + if (! PyArg_Parse(args, "d", &x)) return NULL; errno = 0; #ifdef MPW /* MPW C modf expects pointer to extended as second argument */ |