Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.

This commit is contained in:
Tim Peters 2000-07-09 03:09:57 +00:00
parent 4be47c0f76
commit dbd9ba6a6c
53 changed files with 295 additions and 303 deletions

View file

@ -31,8 +31,8 @@ struct arrayobject; /* Forward */
struct arraydescr {
int typecode;
int itemsize;
PyObject * (*getitem) Py_FPROTO((struct arrayobject *, int));
int (*setitem) Py_FPROTO((struct arrayobject *, int, PyObject *));
PyObject * (*getitem)(struct arrayobject *, int);
int (*setitem)(struct arrayobject *, int, PyObject *);
};
typedef struct arrayobject {
@ -46,15 +46,15 @@ staticforward PyTypeObject Arraytype;
#define is_arrayobject(op) ((op)->ob_type == &Arraytype)
/* Forward */
static PyObject *newarrayobject Py_PROTO((int, struct arraydescr *));
static PyObject *newarrayobject(int, struct arraydescr *);
#if 0
static int getarraysize Py_PROTO((PyObject *));
static int getarraysize(PyObject *);
#endif
static PyObject *getarrayitem Py_PROTO((PyObject *, int));
static int setarrayitem Py_PROTO((PyObject *, int, PyObject *));
static PyObject *getarrayitem(PyObject *, int);
static int setarrayitem(PyObject *, int, PyObject *);
#if 0
static int insarrayitem Py_PROTO((PyObject *, int, PyObject *));
static int addarrayitem Py_PROTO((PyObject *, PyObject *));
static int insarrayitem(PyObject *, int, PyObject *);
static int addarrayitem(PyObject *, PyObject *);
#endif
static PyObject *

View file

@ -38,34 +38,34 @@ typedef char *string;
#define getishortarraysize PyArg_GetShortArraySize
#define getistringarg PyArg_GetString
extern int PyArg_GetObject Py_PROTO((PyObject *args, int nargs,
int i, PyObject **p_a));
extern int PyArg_GetLong Py_PROTO((PyObject *args, int nargs,
int i, long *p_a));
extern int PyArg_GetShort Py_PROTO((PyObject *args, int nargs,
int i, short *p_a));
extern int PyArg_GetFloat Py_PROTO((PyObject *args, int nargs,
int i, float *p_a));
extern int PyArg_GetString Py_PROTO((PyObject *args, int nargs,
int i, string *p_a));
extern int PyArg_GetChar Py_PROTO((PyObject *args, int nargs,
int i, char *p_a));
extern int PyArg_GetLongArray Py_PROTO((PyObject *args, int nargs,
int i, int n, long *p_a));
extern int PyArg_GetShortArray Py_PROTO((PyObject *args, int nargs,
int i, int n, short *p_a));
extern int PyArg_GetDoubleArray Py_PROTO((PyObject *args, int nargs,
int i, int n, double *p_a));
extern int PyArg_GetFloatArray Py_PROTO((PyObject *args, int nargs,
int i, int n, float *p_a));
extern int PyArg_GetLongArraySize Py_PROTO((PyObject *args, int nargs,
int i, long *p_a));
extern int PyArg_GetShortArraySize Py_PROTO((PyObject *args, int nargs,
int i, short *p_a));
extern int PyArg_GetDoubleArraySize Py_PROTO((PyObject *args, int nargs,
int i, double *p_a));
extern int PyArg_GetFloatArraySize Py_PROTO((PyObject *args, int nargs,
int i, float *p_a));
extern int PyArg_GetObject(PyObject *args, int nargs,
int i, PyObject **p_a);
extern int PyArg_GetLong(PyObject *args, int nargs,
int i, long *p_a);
extern int PyArg_GetShort(PyObject *args, int nargs,
int i, short *p_a);
extern int PyArg_GetFloat(PyObject *args, int nargs,
int i, float *p_a);
extern int PyArg_GetString(PyObject *args, int nargs,
int i, string *p_a);
extern int PyArg_GetChar(PyObject *args, int nargs,
int i, char *p_a);
extern int PyArg_GetLongArray(PyObject *args, int nargs,
int i, int n, long *p_a);
extern int PyArg_GetShortArray(PyObject *args, int nargs,
int i, int n, short *p_a);
extern int PyArg_GetDoubleArray(PyObject *args, int nargs,
int i, int n, double *p_a);
extern int PyArg_GetFloatArray(PyObject *args, int nargs,
int i, int n, float *p_a);
extern int PyArg_GetLongArraySize(PyObject *args, int nargs,
int i, long *p_a);
extern int PyArg_GetShortArraySize(PyObject *args, int nargs,
int i, short *p_a);
extern int PyArg_GetDoubleArraySize(PyObject *args, int nargs,
int i, double *p_a);
extern int PyArg_GetFloatArraySize(PyObject *args, int nargs,
int i, float *p_a);
#ifdef __cplusplus
}

View file

@ -347,7 +347,7 @@ math_error()
static PyObject *
math_1(args, func)
PyObject *args;
Py_complex (*func) Py_FPROTO((Py_complex));
Py_complex (*func)(Py_complex);
{
Py_complex x;
if (!PyArg_ParseTuple(args, "D", &x))

View file

@ -107,7 +107,7 @@ gl_varray(self, args)
PyObject *v, *w=NULL;
int i, n, width;
double vec[3];
PyObject * (*getitem) Py_FPROTO((PyObject *, int));
PyObject * (*getitem)(PyObject *, int);
if (!PyArg_GetObject(args, 1, 0, &v))
return NULL;
@ -208,7 +208,7 @@ gen_nvarray(args, inorm)
PyObject *v, *w, *wnorm, *wvec;
int i, n;
float norm[3], vec[3];
PyObject * (*getitem) Py_FPROTO((PyObject *, int));
PyObject * (*getitem)(PyObject *, int);
if (!PyArg_GetObject(args, 1, 0, &v))
return NULL;

View file

@ -1012,8 +1012,8 @@ mpz_mpzcoerce(z)
} /* mpz_mpzcoerce() */
/* Forward */
static void mpz_divm Py_PROTO((MP_INT *res, const MP_INT *num,
const MP_INT *den, const MP_INT *mod));
static void mpz_divm(MP_INT *res, const MP_INT *num,
const MP_INT *den, const MP_INT *mod);
static PyObject *
MPZ_powm(self, args)

View file

@ -71,7 +71,7 @@ nis_mapname (map, pfix)
return map;
}
typedef int (*foreachfunc) Py_PROTO((int, char *, int, char *, int, char *));
typedef int (*foreachfunc)(int, char *, int, char *, int, char *);
struct ypcallback_data {
PyObject *dict;

View file

@ -39,7 +39,7 @@ extern Function *rl_event_hook;
/* Pointers needed from outside (but not declared in a header file). */
extern int (*PyOS_InputHook)();
extern char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *));
extern char *(*PyOS_ReadlineFunctionPointer)(char *);
/* Exported function to send one line to readline's init file parser */

View file

@ -95,12 +95,12 @@ typedef struct {
#define CHANOFFSET(z) (3-(z)) /* this is byte order dependent */
static void expandrow Py_PROTO((unsigned char *, unsigned char *, int));
static void setalpha Py_PROTO((unsigned char *, int));
static void copybw Py_PROTO((Py_Int32 *, int));
static void interleaverow Py_PROTO((unsigned char*, unsigned char*, int, int));
static int compressrow Py_PROTO((unsigned char *, unsigned char *, int, int));
static void lumrow Py_PROTO((unsigned char *, unsigned char *, int));
static void expandrow(unsigned char *, unsigned char *, int);
static void setalpha(unsigned char *, int);
static void copybw(Py_Int32 *, int);
static void interleaverow(unsigned char*, unsigned char*, int, int);
static int compressrow(unsigned char *, unsigned char *, int, int);
static void lumrow(unsigned char *, unsigned char *, int);
#ifdef ADD_TAGS
#define TAGLEN (5)

View file

@ -123,7 +123,7 @@ signal_handler(sig_num)
is_tripped++;
Handlers[sig_num].tripped = 1;
Py_AddPendingCall(
(int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL);
(int (*)(ANY *))PyErr_CheckSignals, NULL);
#ifdef WITH_THREAD
}
#endif
@ -638,7 +638,7 @@ PyErr_SetInterrupt()
{
is_tripped++;
Handlers[SIGINT].tripped = 1;
Py_AddPendingCall((int (*) Py_PROTO((ANY *)))PyErr_CheckSignals, NULL);
Py_AddPendingCall((int (*)(ANY *))PyErr_CheckSignals, NULL);
}
void

View file

@ -1112,7 +1112,7 @@ will allow before refusing new connections.";
static PyObject *
BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args)
{
extern int fclose Py_PROTO((FILE *));
extern int fclose(FILE *);
char *mode = "r";
int bufsize = -1;
#ifdef MS_WIN32

View file

@ -878,7 +878,7 @@ strop_atof(self, args)
PyObject *self; /* Not used */
PyObject *args;
{
extern double strtod Py_PROTO((const char *, char **));
extern double strtod(const char *, char **);
char *s, *end;
double x;
char buffer[256]; /* For errors */

View file

@ -406,11 +406,10 @@ typedef struct _formatdef {
char format;
int size;
int alignment;
PyObject* (*unpack) Py_PROTO((const char *,
const struct _formatdef *));
int (*pack) Py_PROTO((char *,
PyObject *,
const struct _formatdef *));
PyObject* (*unpack)(const char *,
const struct _formatdef *);
int (*pack)(char *, PyObject *,
const struct _formatdef *);
} formatdef;
static PyObject *

View file

@ -37,7 +37,7 @@ typedef struct {
static PyObject *SvError; /* exception sv.error */
static PyObject *newcaptureobject Py_PROTO((svobject *, void *, int));
static PyObject *newcaptureobject(svobject *, void *, int);
/* Set a SV-specific error from svideo_errno and return NULL */
static PyObject *

View file

@ -90,8 +90,8 @@ extern int ftime();
#endif
/* Forward declarations */
static int floatsleep Py_PROTO((double));
static double floattime Py_PROTO(());
static int floatsleep(double);
static double floattime();
/* For Y2K check */
static PyObject *moddict;
@ -255,7 +255,7 @@ tmtotuple(p)
static PyObject *
time_convert(when, function)
time_t when;
struct tm * (*function) Py_PROTO((const time_t *));
struct tm * (*function)(const time_t *);
{
struct tm *p;
errno = 0;
@ -786,8 +786,8 @@ floatsleep(double secs)
#ifdef MSDOS
struct timeb t1, t2;
double frac;
extern double fmod Py_PROTO((double, double));
extern double floor Py_PROTO((double));
extern double fmod(double, double);
extern double floor(double);
if (secs <= 0.0)
return;
frac = fmod(secs, 1.0);