diff options
author | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 17:04:33 (GMT) |
---|---|---|
committer | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 17:04:33 (GMT) |
commit | 6a85027a97d090e2a7e38bb37d816ca22d072760 (patch) | |
tree | 42eb15029fe97868160358a6f8702402df30dd59 /Modules/cgensupport.c | |
parent | 10723347c61e204224307340dc79f661c43e7ae1 (diff) | |
download | cpython-6a85027a97d090e2a7e38bb37d816ca22d072760.zip cpython-6a85027a97d090e2a7e38bb37d816ca22d072760.tar.gz cpython-6a85027a97d090e2a7e38bb37d816ca22d072760.tar.bz2 |
ANSI-fication of the SGI modules (note that svmodule.c and sgimodule.c
have already been checked in)
UNTESTED!
Diffstat (limited to 'Modules/cgensupport.c')
-rw-r--r-- | Modules/cgensupport.c | 72 |
1 files changed, 14 insertions, 58 deletions
diff --git a/Modules/cgensupport.c b/Modules/cgensupport.c index 23fb2a9..71b5586 100644 --- a/Modules/cgensupport.c +++ b/Modules/cgensupport.c @@ -20,10 +20,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. one argument. */ int -PyArg_GetObject(args, nargs, i, p_arg) - register PyObject *args; - int nargs, i; - PyObject **p_arg; +PyArg_GetObject(register PyObject *args, int nargs, int i, PyObject **p_arg) { if (nargs != 1) { if (args == NULL || !PyTuple_Check(args) || @@ -43,10 +40,7 @@ PyArg_GetObject(args, nargs, i, p_arg) } int -PyArg_GetLong(args, nargs, i, p_arg) - register PyObject *args; - int nargs, i; - long *p_arg; +PyArg_GetLong(register PyObject *args, int nargs, int i, long *p_arg) { if (nargs != 1) { if (args == NULL || !PyTuple_Check(args) || @@ -64,10 +58,7 @@ PyArg_GetLong(args, nargs, i, p_arg) } int -PyArg_GetShort(args, nargs, i, p_arg) - register PyObject *args; - int nargs, i; - short *p_arg; +PyArg_GetShort(register PyObject *args, int nargs, int i, short *p_arg) { long x; if (!PyArg_GetLong(args, nargs, i, &x)) @@ -77,9 +68,7 @@ PyArg_GetShort(args, nargs, i, p_arg) } static int -extractdouble(v, p_arg) - register PyObject *v; - double *p_arg; +extractdouble(register PyObject *v, double *p_arg) { if (v == NULL) { /* Fall through to error return at end of function */ @@ -100,9 +89,7 @@ extractdouble(v, p_arg) } static int -extractfloat(v, p_arg) - register PyObject *v; - float *p_arg; +extractfloat(register PyObject *v, float *p_arg) { if (v == NULL) { /* Fall through to error return at end of function */ @@ -123,10 +110,7 @@ extractfloat(v, p_arg) } int -PyArg_GetFloat(args, nargs, i, p_arg) - register PyObject *args; - int nargs, i; - float *p_arg; +PyArg_GetFloat(register PyObject *args, int nargs, int i, float *p_arg) { PyObject *v; float x; @@ -139,10 +123,7 @@ PyArg_GetFloat(args, nargs, i, p_arg) } int -PyArg_GetString(args, nargs, i, p_arg) - PyObject *args; - int nargs, i; - string *p_arg; +PyArg_GetString(PyObject *args, int nargs, int i, string *p_arg) { PyObject *v; if (!PyArg_GetObject(args, nargs, i, &v)) @@ -155,10 +136,7 @@ PyArg_GetString(args, nargs, i, p_arg) } int -PyArg_GetChar(args, nargs, i, p_arg) - PyObject *args; - int nargs, i; - char *p_arg; +PyArg_GetChar(PyObject *args, int nargs, int i, char *p_arg) { string x; if (!PyArg_GetString(args, nargs, i, &x)) @@ -172,10 +150,7 @@ PyArg_GetChar(args, nargs, i, p_arg) } int -PyArg_GetLongArraySize(args, nargs, i, p_arg) - PyObject *args; - int nargs, i; - long *p_arg; +PyArg_GetLongArraySize(PyObject *args, int nargs, int i, long *p_arg) { PyObject *v; if (!PyArg_GetObject(args, nargs, i, &v)) @@ -192,10 +167,7 @@ PyArg_GetLongArraySize(args, nargs, i, p_arg) } int -PyArg_GetShortArraySize(args, nargs, i, p_arg) - PyObject *args; - int nargs, i; - short *p_arg; +PyArg_GetShortArraySize(PyObject *args, int nargs, int i, short *p_arg) { long x; if (!PyArg_GetLongArraySize(args, nargs, i, &x)) @@ -207,11 +179,7 @@ PyArg_GetShortArraySize(args, nargs, i, p_arg) /* XXX The following four are too similar. Should share more code. */ int -PyArg_GetLongArray(args, nargs, i, n, p_arg) - PyObject *args; - int nargs, i; - int n; - long *p_arg; /* [n] */ +PyArg_GetLongArray(PyObject *args, int nargs, int i, int n, long *p_arg) { PyObject *v, *w; if (!PyArg_GetObject(args, nargs, i, &v)) @@ -248,11 +216,7 @@ PyArg_GetLongArray(args, nargs, i, n, p_arg) } int -PyArg_GetShortArray(args, nargs, i, n, p_arg) - PyObject *args; - int nargs, i; - int n; - short *p_arg; /* [n] */ +PyArg_GetShortArray(PyObject *args, int nargs, int i, int n, short *p_arg) { PyObject *v, *w; if (!PyArg_GetObject(args, nargs, i, &v)) @@ -289,11 +253,7 @@ PyArg_GetShortArray(args, nargs, i, n, p_arg) } int -PyArg_GetDoubleArray(args, nargs, i, n, p_arg) - PyObject *args; - int nargs, i; - int n; - double *p_arg; /* [n] */ +PyArg_GetDoubleArray(PyObject *args, int nargs, int i, int n, double *p_arg) { PyObject *v, *w; if (!PyArg_GetObject(args, nargs, i, &v)) @@ -326,11 +286,7 @@ PyArg_GetDoubleArray(args, nargs, i, n, p_arg) } int -PyArg_GetFloatArray(args, nargs, i, n, p_arg) - PyObject *args; - int nargs, i; - int n; - float *p_arg; /* [n] */ +PyArg_GetFloatArray(PyObject *args, int nargs, int i, int n, float *p_arg) { PyObject *v, *w; if (!PyArg_GetObject(args, nargs, i, &v)) |