#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
double (*func) Py_FPROTO((double));
{
double x;
- if (!getdoublearg(args, &x))
+ if (! PyArg_Parse(args, "d", &x))
return NULL;
errno = 0;
x = (*func)(x);
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);
{
double x;
int i;
- if (!getdoublearg(args, &x))
+ if (! PyArg_Parse(args, "d", &x))
return NULL;
errno = 0;
x = frexp(x, &i);
{
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);
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 */