]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.
authorTim Peters <tim.peters@gmail.com>
Sun, 9 Jul 2000 03:09:57 +0000 (03:09 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 9 Jul 2000 03:09:57 +0000 (03:09 +0000)
53 files changed:
Include/cStringIO.h
Include/methodobject.h
Include/mymalloc.h
Include/mymath.h
Include/myproto.h
Modules/arraymodule.c
Modules/cgensupport.h
Modules/cmathmodule.c
Modules/glmodule.c
Modules/mpzmodule.c
Modules/nismodule.c
Modules/readline.c
Modules/rgbimgmodule.c
Modules/signalmodule.c
Modules/socketmodule.c
Modules/stropmodule.c
Modules/structmodule.c
Modules/svmodule.c
Modules/timemodule.c
Objects/abstract.c
Objects/classobject.c
Objects/cobject.c
Objects/fileobject.c
Objects/floatobject.c
Objects/object.c
Parser/acceler.c
Parser/firstsets.c
Parser/grammar.c
Parser/intrcheck.c
Parser/listnode.c
Parser/myreadline.c
Parser/node.c
Parser/parser.c
Parser/parser.h
Parser/parsetok.c
Parser/pgen.c
Parser/pgen.h
Parser/pgenmain.c
Parser/printgrammar.c
Parser/tokenizer.c
Parser/tokenizer.h
Python/bltinmodule.c
Python/ceval.c
Python/compile.c
Python/errors.c
Python/getargs.c
Python/import.c
Python/importdl.h
Python/marshal.c
Python/modsupport.c
Python/pythonrun.c
Python/sysmodule.c
Tools/freeze/makefreeze.py

index 73894329345fd16a220257c9e31d9f817f0d9576..cc62c90a78f56ae3d4362dc164069b7d2dc6386a 100644 (file)
 static struct PycStringIO_CAPI {
   
   /* Read a string.  If the last argument is -1, the remainder will be read. */
-  int(*cread) Py_FPROTO((PyObject *, char **, int));
+  int(*cread)(PyObject *, char **, int);
 
   /* Read a line */
-  int(*creadline) Py_FPROTO((PyObject *, char **));
+  int(*creadline)(PyObject *, char **);
 
   /* Write a string */
-  int(*cwrite) Py_FPROTO((PyObject *, char *, int));
+  int(*cwrite)(PyObject *, char *, int);
 
   /* Get the cStringIO object as a Python string */
-  PyObject *(*cgetvalue) Py_FPROTO((PyObject *));
+  PyObject *(*cgetvalue)(PyObject *);
 
   /* Create a new output object */
-  PyObject *(*NewOutput) Py_FPROTO((int));
+  PyObject *(*NewOutput)(int);
 
   /* Create an input object from a Python string */
-  PyObject *(*NewInput) Py_FPROTO((PyObject *));
+  PyObject *(*NewInput)(PyObject *);
 
   /* The Python types for cStringIO input and output objects.
      Note that you can do input on an output object.
index ace58d31badc94d105e78c97bc01f138f7266643..bb9d96422603a12c9446b8b1f47a0565838d1214 100644 (file)
@@ -20,9 +20,9 @@ extern DL_IMPORT(PyTypeObject) PyCFunction_Type;
 
 #define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type)
 
-typedef PyObject *(*PyCFunction) Py_FPROTO((PyObject *, PyObject *));
-typedef PyObject *(*PyCFunctionWithKeywords)
-       Py_FPROTO((PyObject *, PyObject *, PyObject *));
+typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
+typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
+                                            PyObject *);
 
 extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *);
 extern DL_IMPORT(PyObject *) PyCFunction_GetSelf(PyObject *);
index 3d6ab063d629f77fb5dd52d3f3fddb953ec2d91f..fa2f8f8551b6f5592a166697abecd64a4d216275 100644 (file)
@@ -90,9 +90,9 @@ extern "C" {
 #ifndef PyCore_MALLOC_PROTO
 #undef PyCore_REALLOC_PROTO
 #undef PyCore_FREE_PROTO
-#define PyCore_MALLOC_PROTO     Py_PROTO((size_t))
-#define PyCore_REALLOC_PROTO    Py_PROTO((ANY *, size_t))
-#define PyCore_FREE_PROTO       Py_PROTO((ANY *))
+#define PyCore_MALLOC_PROTO    (size_t)
+#define PyCore_REALLOC_PROTO   (ANY *, size_t)
+#define PyCore_FREE_PROTO      (ANY *)
 #endif
 
 #ifdef NEED_TO_DECLARE_MALLOC_AND_FRIEND
@@ -138,9 +138,9 @@ extern void PyCore_FREE_FUNC PyCore_FREE_PROTO;
    returns a non-NULL pointer, even if the underlying malloc
    doesn't. Returned pointers must be checked for NULL explicitly.
    No action is performed on failure. */
-extern DL_IMPORT(ANY *) PyMem_Malloc Py_PROTO((size_t));
-extern DL_IMPORT(ANY *) PyMem_Realloc Py_PROTO((ANY *, size_t));
-extern DL_IMPORT(void) PyMem_Free Py_PROTO((ANY *));
+extern DL_IMPORT(ANY *) PyMem_Malloc(size_t);
+extern DL_IMPORT(ANY *) PyMem_Realloc(ANY *, size_t);
+extern DL_IMPORT(void) PyMem_Free(ANY *);
 
 /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are
    no longer supported. They used to call PyErr_NoMemory() on failure. */
@@ -198,7 +198,7 @@ extern DL_IMPORT(void) PyMem_Free Py_PROTO((ANY *));
 
    #define PyCore_MALLOC_FUNC      d_malloc
    ...
-   #define PyCore_MALLOC_PROTO Py_PROTO((size_t, char *, unsigned long))
+   #define PyCore_MALLOC_PROTO (size_t, char *, unsigned long)
    ...
    #define NEED_TO_DECLARE_MALLOC_AND_FRIEND
 
index 3a8c62e010f34f9c2f22035fb15a6e61911dcb14..7873a3d9e6a165f3a2eeb9956b6860a1cf347637 100644 (file)
@@ -10,7 +10,7 @@
 #endif
 
 #ifndef HAVE_HYPOT
-extern double hypot Py_PROTO((double, double));
+extern double hypot(double, double);
 #ifdef MWERKS_BEFORE_PRO4
 #define hypot we_dont_want_faulty_hypot_decl
 #endif
index 40abdea83725dc418306a9b32c11c1e0594cda96..94be8df08e0661da41d40b5fd5cc2e14036522ca 100644 (file)
@@ -14,6 +14,11 @@ See the file "Misc/COPYRIGHT" for information on usage and
 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 ******************************************************************/
 
+/***************************************
+THIS FILE IS OBSOLETE
+DON'T USE Py_PROTO or Py_FPROTO anymore.
+***************************************/
+
 #ifdef HAVE_PROTOTYPES
 #define Py_PROTO(x) x
 #else
index 595d930f0db6eb72925ee4bac6bfc624f2f18ecd..04987328cc4f47d18b8ff731915b4253d0175b31 100644 (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 *
index e70720b3f2752c78a8b422b5212d0d91833516fc..2277a4738d656cb2bfc6a1d0643115fd31cdef90 100644 (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
 }
index 313827b211c20ff102a6e1ca66c7c7421038b4b4..aa21bc054bc05e8ce7d688ba4ec1e00047608df6 100644 (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))
index bb14c65784c21f452daf04a33018205edb543cc4..bed80dc6c1572591db0dc20b01c45ff8f93e72ba 100644 (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;
index 62478b88920154a0669606802d23743adcd3eafb..2d10df5bf53b2c4636907a25d667f927fa6a9581 100644 (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)
index 89437294c90e4b51ad09225b5767bbeb4e163c72..877b3a2b4bc4c638bd66e7caa8e14b1ec71f6e6f 100644 (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;
index 9b7bcaf79254884c94fe2a61825bc484eaf83c26..8215321837dd4abd1130f084a6a2500f1c6d7408 100644 (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 */
index cc5c6d5da9467d09bdd6e0b7dd937a759a0feda7..d0956cb35d8862204968a803d1479b98dac60d0d 100644 (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)
index 1c11fdd250310917e4bf906046a1e628cca5ebb2..cfbfe204541644118d592324c40e1e0a3d8c78ae 100644 (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
index f88f6baeffb4e810ee531eec23d44e2d473e1fd4..b8fbeadb4a55c3ff3151f9f86e14a7843348298f 100644 (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
index 2950b15c81e2b1401cf53b7f44fac07955062db0..f37f000cdc2ce9eee658e5cd549e422dc5dafe8f 100644 (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 */
index 5b52a396db99b13c58a246c7a8391ce74cbf845b..fac442f53f600c0209c8b37e6af8e4b84480365e 100644 (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 *
index 9e311b52853cfda6c0f5832ad81df625471bf5b5..4133ae39dd63c1305f042d115cb0e3d740feaed6 100644 (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 *
index 984980c1231324f7764a624d8c1d74e90659ebc6..855863b9de8ce02b94d4896aa70fbaf252e0043c 100644 (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);
index 1800912548f136262484b22a924aa0a99aa9ea34..635079434ec86185a55e6a74ca05fc71d111d335 100644 (file)
@@ -310,7 +310,7 @@ PyNumber_Or(v, w)
        BINOP(v, w, "__or__", "__ror__", PyNumber_Or);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_or) != NULL)
@@ -332,7 +332,7 @@ PyNumber_Xor(v, w)
        BINOP(v, w, "__xor__", "__rxor__", PyNumber_Xor);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_xor) != NULL)
@@ -352,7 +352,7 @@ PyNumber_And(v, w)
        BINOP(v, w, "__and__", "__rand__", PyNumber_And);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_and) != NULL)
@@ -372,7 +372,7 @@ PyNumber_Lshift(v, w)
        BINOP(v, w, "__lshift__", "__rlshift__", PyNumber_Lshift);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_lshift) != NULL)
@@ -392,7 +392,7 @@ PyNumber_Rshift(v, w)
        BINOP(v, w, "__rshift__", "__rrshift__", PyNumber_Rshift);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_rshift) != NULL)
@@ -417,7 +417,7 @@ PyNumber_Add(v, w)
                return (*m->sq_concat)(v, w);
        else if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_add) != NULL)
@@ -437,7 +437,7 @@ PyNumber_Subtract(v, w)
        BINOP(v, w, "__sub__", "__rsub__", PyNumber_Subtract);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_subtract) != NULL)
@@ -469,7 +469,7 @@ PyNumber_Multiply(v, w)
        }
        if (tp->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyInstance_Check(v)) {
                        /* Instances of user-defined classes get their
                           other argument uncoerced, so they may
@@ -515,7 +515,7 @@ PyNumber_Divide(v, w)
        BINOP(v, w, "__div__", "__rdiv__", PyNumber_Divide);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_divide) != NULL)
@@ -539,7 +539,7 @@ PyNumber_Remainder(v, w)
        BINOP(v, w, "__mod__", "__rmod__", PyNumber_Remainder);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_remainder) != NULL)
@@ -559,7 +559,7 @@ PyNumber_Divmod(v, w)
        BINOP(v, w, "__divmod__", "__rdivmod__", PyNumber_Divmod);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
-               PyObject * (*f) Py_FPROTO((PyObject *, PyObject *));
+               PyObject * (*f)(PyObject *, PyObject *);
                if (PyNumber_Coerce(&v, &w) != 0)
                        return NULL;
                if ((f = v->ob_type->tp_as_number->nb_divmod) != NULL)
@@ -579,7 +579,7 @@ do_pow(v, w)
        PyObject *v, *w;
 {
        PyObject *res;
-       PyObject * (*f) Py_FPROTO((PyObject *, PyObject *, PyObject *));
+       PyObject * (*f)(PyObject *, PyObject *, PyObject *);
        BINOP(v, w, "__pow__", "__rpow__", do_pow);
        if (v->ob_type->tp_as_number == NULL ||
            w->ob_type->tp_as_number == NULL) {
@@ -604,7 +604,7 @@ PyNumber_Power(v, w, z)
 {
        PyObject *res;
        PyObject *v1, *z1, *w2, *z2;
-       PyObject * (*f) Py_FPROTO((PyObject *, PyObject *, PyObject *));
+       PyObject * (*f)(PyObject *, PyObject *, PyObject *);
 
        if (z == Py_None)
                return do_pow(v, w);
index 0e1308bbc0a257b0bfc089d5543e051e7d158ddf..3192ddd0c083526bde7d09059072838fa542871b 100644 (file)
@@ -14,10 +14,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #include "structmember.h"
 
 /* Forward */
-static PyObject *class_lookup
-       Py_PROTO((PyClassObject *, PyObject *, PyClassObject **));
-static PyObject *instance_getattr1 Py_PROTO((PyInstanceObject *, PyObject *));
-static PyObject *instance_getattr2 Py_PROTO((PyInstanceObject *, PyObject *));
+static PyObject *class_lookup(PyClassObject *, PyObject *,
+                             PyClassObject **);
+static PyObject *instance_getattr1(PyInstanceObject *, PyObject *);
+static PyObject *instance_getattr2(PyInstanceObject *, PyObject *);
 
 static PyObject *getattrstr, *setattrstr, *delattrstr;
 
@@ -1203,8 +1203,8 @@ generic_unary_op(self, methodname)
 
 
 /* Forward */
-static int halfbinop Py_PROTO((PyObject *, PyObject *, char *, PyObject **,
-               PyObject * (*) Py_PROTO((PyObject *, PyObject *)), int ));
+static int halfbinop(PyObject *, PyObject *, char *, PyObject **,
+                    PyObject * (*)(PyObject *, PyObject *), int);
 
 
 /* Implement a binary operator involving at least one class instance. */
@@ -1215,7 +1215,7 @@ PyInstance_DoBinOp(v, w, opname, ropname, thisfunc)
        PyObject *w;
        char *opname;
        char *ropname;
-       PyObject * (*thisfunc) Py_PROTO((PyObject *, PyObject *));
+       PyObject * (*thisfunc)(PyObject *, PyObject *);
 {
        char buf[256];
        PyObject *result = NULL;
@@ -1249,7 +1249,7 @@ halfbinop(v, w, opname, r_result, thisfunc, swapped)
        PyObject *w;
        char *opname;
        PyObject **r_result;
-       PyObject * (*thisfunc) Py_PROTO((PyObject *, PyObject *));
+       PyObject * (*thisfunc)(PyObject *, PyObject *);
        int swapped;
 {
        PyObject *func;
index b184acb27928280598842184970ed0c98abb16ab..06c29f00ce4db1e89d98aa2262ac335e782f6e44 100644 (file)
@@ -15,20 +15,20 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
 /* Declarations for objects of type PyCObject */
 
-typedef void (*destructor1) Py_PROTO((void *));
-typedef void (*destructor2) Py_PROTO((void *, void*));
+typedef void (*destructor1)(void *);
+typedef void (*destructor2)(void *, void*);
 
 typedef struct {
        PyObject_HEAD
        void *cobject;
         void *desc;
-       void (*destructor) Py_PROTO((void *));
+       void (*destructor)(void *);
 } PyCObject;
 
 PyObject *
 PyCObject_FromVoidPtr(cobj, destr)
        void *cobj;
-       void (*destr) Py_PROTO((void *));
+       void (*destr)(void *);
 {
        PyCObject *self;
        
@@ -45,7 +45,7 @@ PyObject *
 PyCObject_FromVoidPtrAndDesc(cobj, desc, destr)
        void *cobj;
        void *desc;
-       void (*destr) Py_PROTO((void *, void *));
+       void (*destr)(void *, void *);
 {
        PyCObject *self;
 
index 7247ff8461043b1dd5b1c4650116dafe9dcf978b..bf4aed49d78c884eb09087060a8bc140d50072c7 100644 (file)
@@ -69,7 +69,7 @@ typedef struct {
        FILE *f_fp;
        PyObject *f_name;
        PyObject *f_mode;
-       int (*f_close) Py_PROTO((FILE *));
+       int (*f_close)(FILE *);
        int f_softspace; /* Flag used by 'print' command */
        int f_binary; /* Flag which indicates whether the file is open
                         open in binary (1) or test (0) mode */
@@ -100,7 +100,7 @@ PyFile_FromFile(fp, name, mode, close)
        FILE *fp;
        char *name;
        char *mode;
-       int (*close) Py_FPROTO((FILE *));
+       int (*close)(FILE *);
 {
        PyFileObject *f = PyObject_NEW(PyFileObject, &PyFile_Type);
        if (f == NULL)
@@ -126,7 +126,7 @@ PyObject *
 PyFile_FromString(name, mode)
        char *name, *mode;
 {
-       extern int fclose Py_PROTO((FILE *));
+       extern int fclose(FILE *);
        PyFileObject *f;
        f = (PyFileObject *) PyFile_FromFile((FILE *)NULL, name, mode, fclose);
        if (f == NULL)
index 55fcd06b95c85504cfdfcf33a1435ff832ec9b5d..8b4f2d99d34abe91bf5040ef82c43ccb6a7dd987 100644 (file)
@@ -64,8 +64,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #endif
 
 #if !defined(__STDC__) && !defined(macintosh)
-extern double fmod Py_PROTO((double, double));
-extern double pow Py_PROTO((double, double));
+extern double fmod(double, double);
+extern double pow(double, double);
 #endif
 
 #ifdef sun
@@ -137,7 +137,7 @@ PyFloat_FromString(v, pend)
        PyObject *v;
        char **pend;
 {
-       extern double strtod Py_PROTO((const char *, char **));
+       extern double strtod(const char *, char **);
        const char *s, *last, *end;
        double x;
        char buffer[256]; /* For errors */
index 9c4cd6a05a37e5813ae53b0d107773ea3052b034..c1bdc71bd9444760c2da31d3febe78dce54a1753 100644 (file)
@@ -1001,7 +1001,7 @@ PyTypeObject *_Py_cobject_hack = &PyCObject_Type;
 
 
 /* Hack to force loading of abstract.o */
-int (*_Py_abstract_hack) Py_FPROTO((PyObject *)) = &PyObject_Length;
+int (*_Py_abstract_hack)(PyObject *) = &PyObject_Length;
 
 
 /* Python's malloc wrappers (see mymalloc.h) */
index b20322d13e81ace6a5ed531774fd79da9548b397..177bb49fe41bd44715e7b058934f814879bdcb9d 100644 (file)
@@ -26,8 +26,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #include "parser.h"
 
 /* Forward references */
-static void fixdfa Py_PROTO((grammar *, dfa *));
-static void fixstate Py_PROTO((grammar *, state *));
+static void fixdfa(grammar *, dfa *);
+static void fixstate(grammar *, state *);
 
 void
 PyGrammar_AddAccelerators(g)
index c7127c13151753c45f1c7518fe31d89206b6adf0..b27ed2e2c2a3e0904db2a92cc8ae8baa03768c14 100644 (file)
@@ -17,7 +17,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 extern int Py_DebugFlag;
 
 /* Forward */
-static void calcfirstset Py_PROTO((grammar *, dfa *));
+static void calcfirstset(grammar *, dfa *);
 
 void
 addfirstsets(g)
index 6fbb843966873f931f33110036f609331fa1b6ba..1a507860c9c8692d05771692823bec3c8541a564 100644 (file)
@@ -142,7 +142,7 @@ findlabel(ll, type, str)
 }
 
 /* Forward */
-static void translabel Py_PROTO((grammar *, label *));
+static void translabel(grammar *, label *);
 
 void
 translatelabels(g)
index 3d4a27fa6d0f305efb0aaab4514219f17a45dd89..5278d769baf3b96b727f50e9ffe87664c9ccdb67 100644 (file)
@@ -22,7 +22,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #include "intrcheck.h"
 
 /* Copied here from ceval.h -- can't include that file. */
-int Py_AddPendingCall Py_PROTO((int (*func) Py_PROTO((ANY *)), ANY *arg));
+int Py_AddPendingCall(int (*func)(ANY *), ANY *arg);
 
 
 #ifdef QUICKWIN
@@ -152,7 +152,7 @@ intcatcher(sig)
        int sig; /* Not used by required by interface */
 #endif /* _M_IX86 */
 {
-       extern void Py_Exit Py_PROTO((int));
+       extern void Py_Exit(int);
        static char message[] =
 "python: to interrupt a truly hanging Python program, interrupt once more.\n";
        switch (interrupted++) {
index 24559f50f3c238c1254be573eb79dfa5a8c24cea..c7d5cfa1bb935eabbfff42ff354cf4edd5214678 100644 (file)
@@ -15,8 +15,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #include "node.h"
 
 /* Forward */
-static void list1node Py_PROTO((FILE *, node *));
-static void listnode Py_PROTO((FILE *, node *));
+static void list1node(FILE *, node *);
+static void listnode(FILE *, node *);
 
 void
 PyNode_ListTree(n)
index 96749b2f03cec06664a6adffd80f6e81b70d083b..bb35000d0e286045ef3427f1521f6b043298d91b 100644 (file)
@@ -118,7 +118,7 @@ PyOS_StdioReadline(prompt)
 
    Note: Python expects in return a buffer allocated with PyMem_Malloc. */
 
-char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *));
+char *(*PyOS_ReadlineFunctionPointer)(char *);
 
 
 /* Interface used by tokenizer.c and bltinmodule.c */
index 5cef376d621c04b93137f57be04013bd5033a097..3a710ef248e0b9a8110c16fd70d333716ac89d1e 100644 (file)
@@ -64,7 +64,7 @@ PyNode_AddChild(n1, type, str, lineno)
 }
 
 /* Forward */
-static void freechildren Py_PROTO((node *));
+static void freechildren(node *);
 
 
 void
index fb1a05152a60c8880dd782c94e20e26de0389667..ee40f216139c9112252c062ada000050a0159d14 100644 (file)
@@ -33,7 +33,7 @@ extern int Py_DebugFlag;
 
 /* STACK DATA TYPE */
 
-static void s_reset Py_PROTO((stack *));
+static void s_reset(stack *);
 
 static void
 s_reset(s)
@@ -44,7 +44,7 @@ s_reset(s)
 
 #define s_empty(s) ((s)->s_top == &(s)->s_base[MAXSTACK])
 
-static int s_push Py_PROTO((stack *, dfa *, node *));
+static int s_push(stack *, dfa *, node *);
 
 static int
 s_push(s, d, parent)
@@ -66,7 +66,7 @@ s_push(s, d, parent)
 
 #ifdef Py_DEBUG
 
-static void s_pop Py_PROTO((stack *));
+static void s_pop(stack *);
 
 static void
 s_pop(s)
@@ -122,7 +122,7 @@ PyParser_Delete(ps)
 
 /* PARSER STACK OPERATIONS */
 
-static int shift Py_PROTO((stack *, int, char *, int, int));
+static int shift(stack *, int, char *, int, int);
 
 static int
 shift(s, type, str, newstate, lineno)
@@ -141,7 +141,7 @@ shift(s, type, str, newstate, lineno)
        return 0;
 }
 
-static int push Py_PROTO((stack *, int, dfa *, int, int));
+static int push(stack *, int, dfa *, int, int);
 
 static int
 push(s, type, d, newstate, lineno)
@@ -165,7 +165,7 @@ push(s, type, d, newstate, lineno)
 
 /* PARSER PROPER */
 
-static int classify Py_PROTO((grammar *, int, char *));
+static int classify(grammar *, int, char *);
 
 static int
 classify(g, type, str)
index 0fd0081f0ce88c3e9315b68c0f1fd8ba385badf4..608737363a72ad0a6afb7b0b643881bb0723a1ec 100644 (file)
@@ -36,11 +36,10 @@ typedef struct {
        node            *p_tree;        /* Top of parse tree */
 } parser_state;
 
-parser_state *PyParser_New Py_PROTO((grammar *g, int start));
-void PyParser_Delete Py_PROTO((parser_state *ps));
-int PyParser_AddToken
-       Py_PROTO((parser_state *ps, int type, char *str, int lineno));
-void PyGrammar_AddAccelerators Py_PROTO((grammar *g));
+parser_state *PyParser_New(grammar *g, int start);
+void PyParser_Delete(parser_state *ps);
+int PyParser_AddToken(parser_state *ps, int type, char *str, int lineno);
+void PyGrammar_AddAccelerators(grammar *g);
 
 #ifdef __cplusplus
 }
index 1d6e024ae0e3770b008afc9b5493e4182ba8cea8..9ac1606ae8f08e8336a79b2c89586485f8af5928 100644 (file)
@@ -22,8 +22,7 @@ int Py_TabcheckFlag;
 
 
 /* Forward */
-static node *parsetok Py_PROTO((struct tok_state *, grammar *, int,
-                            perrdetail *));
+static node *parsetok(struct tok_state *, grammar *, int, perrdetail *);
 
 /* Parse input coming from a string.  Return error code, print some errors. */
 
index 36279b0b227546c4a33820d58dffd147418df74a..e5d5d37f6285a0b211b2bb99e2133d294172209b 100644 (file)
@@ -45,14 +45,14 @@ typedef struct _nfa {
 } nfa;
 
 /* Forward */
-static void compile_rhs Py_PROTO((labellist *ll,
-                              nfa *nf, node *n, int *pa, int *pb));
-static void compile_alt Py_PROTO((labellist *ll,
-                              nfa *nf, node *n, int *pa, int *pb));
-static void compile_item Py_PROTO((labellist *ll,
-                               nfa *nf, node *n, int *pa, int *pb));
-static void compile_atom Py_PROTO((labellist *ll,
-                               nfa *nf, node *n, int *pa, int *pb));
+static void compile_rhs(labellist *ll,
+                       nfa *nf, node *n, int *pa, int *pb);
+static void compile_alt(labellist *ll,
+                       nfa *nf, node *n, int *pa, int *pb);
+static void compile_item(labellist *ll,
+                        nfa *nf, node *n, int *pa, int *pb);
+static void compile_atom(labellist *ll,
+                        nfa *nf, node *n, int *pa, int *pb);
 
 static int
 addnfastate(nf)
@@ -111,7 +111,7 @@ typedef struct _nfagrammar {
 } nfagrammar;
 
 /* Forward */
-static void compile_rule Py_PROTO((nfagrammar *gr, node *n));
+static void compile_rule(nfagrammar *gr, node *n);
 
 static nfagrammar *
 newnfagrammar()
@@ -420,10 +420,10 @@ typedef struct _ss_dfa {
 } ss_dfa;
 
 /* Forward */
-static void printssdfa Py_PROTO((int xx_nstates, ss_state *xx_state, int nbits,
-                             labellist *ll, char *msg));
-static void simplify Py_PROTO((int xx_nstates, ss_state *xx_state));
-static void convert Py_PROTO((dfa *d, int xx_nstates, ss_state *xx_state));
+static void printssdfa(int xx_nstates, ss_state *xx_state, int nbits,
+                      labellist *ll, char *msg);
+static void simplify(int xx_nstates, ss_state *xx_state);
+static void convert(dfa *d, int xx_nstates, ss_state *xx_state);
 
 static void
 makedfa(gr, nf, d)
index a20a0c24c2825206df316ec5d25a47ab1c368e04..ddf52e60dd3ff4842a66710d0bc2b8e93327ebaf 100644 (file)
@@ -16,10 +16,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
 /* Parser generator interface */
 
-extern grammar *meta_grammar Py_PROTO((void));
+extern grammar *meta_grammar(void);
 
 struct _node;
-extern grammar *pgen Py_PROTO((struct _node *));
+extern grammar *pgen(struct _node *);
 
 #ifdef __cplusplus
 }
index ef24d75307ade8da9c05427d4e0c63b6d295f04a..0562e3912fc2ef2ddff43b7720adb84a35fd03e5 100644 (file)
@@ -32,10 +32,10 @@ int Py_DebugFlag;
 int Py_VerboseFlag;
 
 /* Forward */
-grammar *getgrammar Py_PROTO((char *filename));
+grammar *getgrammar(char *filename);
 #ifdef THINK_C
-int main Py_PROTO((int, char **));
-char *askfile Py_PROTO((void));
+int main(int, char **);
+char *askfile(void);
 #endif
 
 void
index e3a87aaa57f51564270b475435f0e4d1bf6958cb..5d1d9e0a135bbe1e2e285ad2e83153c461d39548 100644 (file)
@@ -14,10 +14,10 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #include "grammar.h"
 
 /* Forward */
-static void printarcs Py_PROTO((int, dfa *, FILE *));
-static void printstates Py_PROTO((grammar *, FILE *));
-static void printdfas Py_PROTO((grammar *, FILE *));
-static void printlabels Py_PROTO((grammar *, FILE *));
+static void printarcs(int, dfa *, FILE *);
+static void printstates(grammar *, FILE *);
+static void printdfas(grammar *, FILE *);
+static void printlabels(grammar *, FILE *);
 
 void
 printgrammar(g, fp)
index ef0d7118b8c10e210cd8d5474522c9b0ce45e03b..0ef3fc00ff835e43f564e584e6464aae4a8f144c 100644 (file)
@@ -17,7 +17,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #include "tokenizer.h"
 #include "errcode.h"
 
-extern char *PyOS_Readline Py_PROTO((char *));
+extern char *PyOS_Readline(char *);
 /* Return malloc'ed string including trailing \n;
    empty malloc'ed string for EOF;
    NULL if interrupted */
@@ -34,9 +34,9 @@ extern char *PyOS_Readline Py_PROTO((char *));
 #endif
 
 /* Forward */
-static struct tok_state *tok_new Py_PROTO((void));
-static int tok_nextc Py_PROTO((struct tok_state *tok));
-static void tok_backup Py_PROTO((struct tok_state *tok, int c));
+static struct tok_state *tok_new(void);
+static int tok_nextc(struct tok_state *tok);
+static void tok_backup(struct tok_state *tok, int c);
 
 /* Token names */
 
index 0a717fe08bf862ce32d33e3ff3d4708ec29d3bd4..93a04abf47aa287bcf5b79205fa26e54d1bcaaf2 100644 (file)
@@ -49,11 +49,10 @@ struct tok_state {
        int altindstack[MAXINDENT];     /* Stack of alternate indents */
 };
 
-extern struct tok_state *PyTokenizer_FromString Py_PROTO((char *));
-extern struct tok_state *PyTokenizer_FromFile
-       Py_PROTO((FILE *, char *, char *));
-extern void PyTokenizer_Free Py_PROTO((struct tok_state *));
-extern int PyTokenizer_Get Py_PROTO((struct tok_state *, char **, char **));
+extern struct tok_state *PyTokenizer_FromString(char *);
+extern struct tok_state *PyTokenizer_FromFile(FILE *, char *, char *);
+extern void PyTokenizer_Free(struct tok_state *);
+extern int PyTokenizer_Get(struct tok_state *, char **, char **);
 
 #ifdef __cplusplus
 }
index 2bae3eb433c5930ca31724d7e0ae55f13c9edcf4..a00cd5dbf8d4a47ec62c363be8f5f885010b59e0 100644 (file)
@@ -28,8 +28,8 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #endif
 
 /* Forward */
-static PyObject *filterstring Py_PROTO((PyObject *, PyObject *));
-static PyObject *filtertuple  Py_PROTO((PyObject *, PyObject *));
+static PyObject *filterstring(PyObject *, PyObject *);
+static PyObject *filtertuple (PyObject *, PyObject *);
 
 static PyObject *
 builtin___import__(self, args)
@@ -428,7 +428,7 @@ static PyObject *
 complex_from_string(v)
        PyObject *v;
 {
-       extern double strtod Py_PROTO((const char *, char **));
+       extern double strtod(const char *, char **);
        const char *s, *start;
        char *end;
        double x=0.0, y=0.0, z;
@@ -1225,7 +1225,7 @@ static char hex_doc[] =
 Return the hexadecimal representation of an integer or long integer.";
 
 
-static PyObject *builtin_raw_input Py_PROTO((PyObject *, PyObject *));
+static PyObject *builtin_raw_input(PyObject *, PyObject *);
 
 static PyObject *
 builtin_input(self, args)
index dfd477693b84db972a8f4d3553be263ea90234e3..0bf5d00410614a2e882da0fbb6f149611dd67681 100644 (file)
@@ -43,34 +43,32 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
 /* Forward declarations */
 
-static PyObject *eval_code2 Py_PROTO((PyCodeObject *,
-                                PyObject *, PyObject *,
-                                PyObject **, int,
-                                PyObject **, int,
-                                PyObject **, int,
-                                PyObject *));
+static PyObject *eval_code2(PyCodeObject *,
+                           PyObject *, PyObject *,
+                           PyObject **, int,
+                           PyObject **, int,
+                           PyObject **, int,
+                           PyObject *);
 #ifdef LLTRACE
-static int prtrace Py_PROTO((PyObject *, char *));
+static int prtrace(PyObject *, char *);
 #endif
-static void call_exc_trace Py_PROTO((PyObject **, PyObject**,
-                                    PyFrameObject *));
-static int call_trace Py_PROTO((PyObject **, PyObject **,
-                               PyFrameObject *, char *, PyObject *));
-static PyObject *call_builtin Py_PROTO((PyObject *, PyObject *, PyObject *));
-static PyObject *call_function Py_PROTO((PyObject *, PyObject *, PyObject *));
-static PyObject *loop_subscript Py_PROTO((PyObject *, PyObject *));
-static PyObject *apply_slice Py_PROTO((PyObject *, PyObject *, PyObject *));
-static int assign_slice Py_PROTO((PyObject *, PyObject *,
-                                 PyObject *, PyObject *));
-static PyObject *cmp_outcome Py_PROTO((int, PyObject *, PyObject *));
-static int import_from Py_PROTO((PyObject *, PyObject *, PyObject *));
-static PyObject *build_class Py_PROTO((PyObject *, PyObject *, PyObject *));
-static int exec_statement Py_PROTO((PyFrameObject *,
-                                   PyObject *, PyObject *, PyObject *));
-static PyObject *find_from_args Py_PROTO((PyFrameObject *, int));
-static void set_exc_info Py_PROTO((PyThreadState *,
-                               PyObject *, PyObject *, PyObject *));
-static void reset_exc_info Py_PROTO((PyThreadState *));
+static void call_exc_trace(PyObject **, PyObject**, PyFrameObject *);
+static int call_trace(PyObject **, PyObject **,
+                     PyFrameObject *, char *, PyObject *);
+static PyObject *call_builtin(PyObject *, PyObject *, PyObject *);
+static PyObject *call_function(PyObject *, PyObject *, PyObject *);
+static PyObject *loop_subscript(PyObject *, PyObject *);
+static PyObject *apply_slice(PyObject *, PyObject *, PyObject *);
+static int assign_slice(PyObject *, PyObject *,
+                       PyObject *, PyObject *);
+static PyObject *cmp_outcome(int, PyObject *, PyObject *);
+static int import_from(PyObject *, PyObject *, PyObject *);
+static PyObject *build_class(PyObject *, PyObject *, PyObject *);
+static int exec_statement(PyFrameObject *,
+                         PyObject *, PyObject *, PyObject *);
+static PyObject *find_from_args(PyFrameObject *, int);
+static void set_exc_info(PyThreadState *, PyObject *, PyObject *, PyObject *);
+static void reset_exc_info(PyThreadState *);
 
 
 /* Dynamic execution profile */
@@ -211,7 +209,7 @@ PyEval_RestoreThread(tstate)
 
 #define NPENDINGCALLS 32
 static struct {
-       int (*func) Py_PROTO((ANY *));
+       int (*func)(ANY *);
        ANY *arg;
 } pendingcalls[NPENDINGCALLS];
 static volatile int pendingfirst = 0;
@@ -220,7 +218,7 @@ static volatile int things_to_do = 0;
 
 int
 Py_AddPendingCall(func, arg)
-       int (*func) Py_PROTO((ANY *));
+       int (*func)(ANY *);
        ANY *arg;
 {
        static int busy = 0;
@@ -258,7 +256,7 @@ Py_MakePendingCalls()
        things_to_do = 0;
        for (;;) {
                int i;
-               int (*func) Py_PROTO((ANY *));
+               int (*func)(ANY *);
                ANY *arg;
                i = pendingfirst;
                if (i == pendinglast)
@@ -287,8 +285,8 @@ enum why_code {
                WHY_BREAK       /* 'break' statement */
 };
 
-static enum why_code do_raise Py_PROTO((PyObject *, PyObject *, PyObject *));
-static int unpack_sequence Py_PROTO((PyObject *, int, PyObject **));
+static enum why_code do_raise(PyObject *, PyObject *, PyObject *);
+static int unpack_sequence(PyObject *, int, PyObject **);
 
 
 PyObject *
index ce7c0e484ddd6000437aff036d34095cefdb9afc..8cf85a738315ed216e0b4656ad37a1107dbf1e4e 100644 (file)
@@ -375,30 +375,30 @@ block_pop(c, type)
 
 /* Prototype forward declarations */
 
-static int com_init Py_PROTO((struct compiling *, char *));
-static void com_free Py_PROTO((struct compiling *));
-static void com_push Py_PROTO((struct compiling *, int));
-static void com_pop Py_PROTO((struct compiling *, int));
-static void com_done Py_PROTO((struct compiling *));
-static void com_node Py_PROTO((struct compiling *, struct _node *));
-static void com_factor Py_PROTO((struct compiling *, struct _node *));
-static void com_addbyte Py_PROTO((struct compiling *, int));
-static void com_addint Py_PROTO((struct compiling *, int));
-static void com_addoparg Py_PROTO((struct compiling *, int, int));
-static void com_addfwref Py_PROTO((struct compiling *, int, int *));
-static void com_backpatch Py_PROTO((struct compiling *, int));
-static int com_add Py_PROTO((struct compiling *, PyObject *, PyObject *, PyObject *));
-static int com_addconst Py_PROTO((struct compiling *, PyObject *));
-static int com_addname Py_PROTO((struct compiling *, PyObject *));
-static void com_addopname Py_PROTO((struct compiling *, int, node *));
-static void com_list Py_PROTO((struct compiling *, node *, int));
-static int com_argdefs Py_PROTO((struct compiling *, node *));
-static int com_newlocal Py_PROTO((struct compiling *, char *));
-static PyCodeObject *icompile Py_PROTO((struct _node *, struct compiling *));
-static PyCodeObject *jcompile Py_PROTO((struct _node *, char *,
-                                       struct compiling *));
-static PyObject *parsestrplus Py_PROTO((node *));
-static PyObject *parsestr Py_PROTO((char *));
+static int com_init(struct compiling *, char *);
+static void com_free(struct compiling *);
+static void com_push(struct compiling *, int);
+static void com_pop(struct compiling *, int);
+static void com_done(struct compiling *);
+static void com_node(struct compiling *, struct _node *);
+static void com_factor(struct compiling *, struct _node *);
+static void com_addbyte(struct compiling *, int);
+static void com_addint(struct compiling *, int);
+static void com_addoparg(struct compiling *, int, int);
+static void com_addfwref(struct compiling *, int, int *);
+static void com_backpatch(struct compiling *, int);
+static int com_add(struct compiling *, PyObject *, PyObject *, PyObject *);
+static int com_addconst(struct compiling *, PyObject *);
+static int com_addname(struct compiling *, PyObject *);
+static void com_addopname(struct compiling *, int, node *);
+static void com_list(struct compiling *, node *, int);
+static int com_argdefs(struct compiling *, node *);
+static int com_newlocal(struct compiling *, char *);
+static PyCodeObject *icompile(struct _node *, struct compiling *);
+static PyCodeObject *jcompile(struct _node *, char *,
+                             struct compiling *);
+static PyObject *parsestrplus(node *);
+static PyObject *parsestr(char *);
 
 static int
 com_init(c, filename)
@@ -813,7 +813,7 @@ parsenumber(co, s)
        struct compiling *co;
        char *s;
 {
-       extern double atof Py_PROTO((const char *));
+       extern double atof(const char *);
        char *end;
        long x;
        double dx;
@@ -1823,8 +1823,8 @@ com_list(c, n, toplevel)
 
 /* Begin of assignment compilation */
 
-static void com_assign_name Py_PROTO((struct compiling *, node *, int));
-static void com_assign Py_PROTO((struct compiling *, node *, int));
+static void com_assign_name(struct compiling *, node *, int);
+static void com_assign(struct compiling *, node *, int);
 
 static void
 com_assign_attr(c, n, assigning)
@@ -2013,7 +2013,7 @@ com_assign(c, n, assigning)
        }
 }
 
-/* Forward */ static node *get_rawdocstring Py_PROTO((node *));
+/* Forward */ static node *get_rawdocstring(node *);
 
 static void
 com_expr_stmt(c, n)
@@ -3041,7 +3041,7 @@ com_node(c, n)
        }
 }
 
-static void com_fplist Py_PROTO((struct compiling *, node *));
+static void com_fplist(struct compiling *, node *);
 
 static void
 com_fpdef(c, n)
index d2aa3dd603f67a25b82f52ba1ec352f409fd0f11..4a3573e4dc394b82782acc3c992a7bb1e7b68ea8 100644 (file)
@@ -17,14 +17,14 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #endif
 
 #ifdef macintosh
-extern char *PyMac_StrError Py_PROTO((int));
+extern char *PyMac_StrError(int);
 #undef strerror
 #define strerror PyMac_StrError
 #endif /* macintosh */
 
 #ifndef __STDC__
 #ifndef MS_WINDOWS
-extern char *strerror Py_PROTO((int));
+extern char *strerror(int);
 #endif
 #endif
 
index a28354dda0c8db70cc973c458218e3265c671539..ba855afb1966710c2a514f1fbe9a23429fdf3d2a 100644 (file)
@@ -23,26 +23,25 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 #endif
 
 
-int PyArg_Parse Py_PROTO((PyObject *, char *, ...));
-int PyArg_ParseTuple Py_PROTO((PyObject *, char *, ...));
-int PyArg_VaParse Py_PROTO((PyObject *, char *, va_list));
+int PyArg_Parse(PyObject *, char *, ...);
+int PyArg_ParseTuple(PyObject *, char *, ...);
+int PyArg_VaParse(PyObject *, char *, va_list);
 
-int PyArg_ParseTupleAndKeywords Py_PROTO((PyObject *, PyObject *,
-                                      char *, char **, ...));
+int PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
+                               char *, char **, ...);
 
 /* Forward */
-static int vgetargs1 Py_PROTO((PyObject *, char *, va_list *, int));
-static void seterror Py_PROTO((int, char *, int *, char *, char *));
-static char *convertitem Py_PROTO((PyObject *, char **, va_list *,
-                                  int *, char *));
-static char *converttuple Py_PROTO((PyObject *, char **, va_list *,
-                                int *, char *, int));
-static char *convertsimple Py_PROTO((PyObject *, char **, va_list *, char *));
-static char *convertsimple1 Py_PROTO((PyObject *, char **, va_list *));
-
-static int vgetargskeywords Py_PROTO((PyObject *, PyObject *,
-                                  char *, char **, va_list *));
-static char *skipitem Py_PROTO((char **, va_list *));
+static int vgetargs1(PyObject *, char *, va_list *, int);
+static void seterror(int, char *, int *, char *, char *);
+static char *convertitem(PyObject *, char **, va_list *, int *, char *);
+static char *converttuple(PyObject *, char **, va_list *,
+                         int *, char *, int);
+static char *convertsimple(PyObject *, char **, va_list *, char *);
+static char *convertsimple1(PyObject *, char **, va_list *);
+
+static int vgetargskeywords(PyObject *, PyObject *,
+                           char *, char **, va_list *);
+static char *skipitem(char **, va_list *);
 
 #ifdef HAVE_STDARG_PROTOTYPES
 /* VARARGS2 */
@@ -886,8 +885,7 @@ convertsimple1(arg, p_format, p_va)
                                
                        }
                        else if (*format == '&') {
-                               typedef int (*converter)
-                                       Py_PROTO((PyObject *, void *));
+                               typedef int (*converter)(PyObject *, void *);
                                converter convert = va_arg(*p_va, converter);
                                void *addr = va_arg(*p_va, void *);
                                format++;
@@ -1323,8 +1321,7 @@ skipitem(p_format, p_va)
                        }
 #endif
                        else if (*format == '&') {
-                               typedef int (*converter)
-                                       Py_PROTO((PyObject *, void *));
+                               typedef int (*converter)(PyObject *, void *);
                                (void) va_arg(*p_va, converter);
                                (void) va_arg(*p_va, void *);
                                format++;
index 7e74f2bb758adbbc471f37e4bb1231d62e8df27e..f1efccb8718d836cd390de4ad181aa0b3d653ebc 100644 (file)
@@ -763,10 +763,10 @@ load_source_module(name, pathname, fp)
 
 
 /* Forward */
-static PyObject *load_module Py_PROTO((char *, FILE *, char *, int));
-static struct filedescr *find_module Py_PROTO((char *, PyObject *,
-                                              char *, size_t, FILE **));
-static struct _frozen *find_frozen Py_PROTO((char *name));
+static PyObject *load_module(char *, FILE *, char *, int);
+static struct filedescr *find_module(char *, PyObject *,
+                                    char *, size_t, FILE **);
+static struct _frozen *find_frozen(char *name);
 
 /* Load a package and return its module object WITH INCREMENTED
    REFERENCE COUNT */
@@ -855,7 +855,7 @@ extern FILE *PyWin_FindRegisteredModule();
 static int check_case(char *, int, int, char *);
 #endif
 
-static int find_init_module Py_PROTO((char *)); /* Forward */
+static int find_init_module(char *); /* Forward */
 
 static struct filedescr *
 find_module(realname, path, buf, buflen, p_fp)
@@ -1206,7 +1206,7 @@ find_init_module(buf)
 #endif /* HAVE_STAT */
 
 
-static int init_builtin Py_PROTO((char *)); /* Forward */
+static int init_builtin(char *); /* Forward */
 
 /* Load an external module using the default search path and return
    its module object WITH INCREMENTED REFERENCE COUNT */
@@ -1455,15 +1455,13 @@ PyImport_ImportModule(name)
 }
 
 /* Forward declarations for helper routines */
-static PyObject *get_parent Py_PROTO((PyObject *globals,
-                                     char *buf, int *p_buflen));
-static PyObject *load_next Py_PROTO((PyObject *mod, PyObject *altmod,
-                                    char **p_name, char *buf, int *p_buflen));
-static int mark_miss Py_PROTO((char *name));
-static int ensure_fromlist Py_PROTO((PyObject *mod, PyObject *fromlist,
-                                    char *buf, int buflen, int recursive));
-static PyObject * import_submodule Py_PROTO((PyObject *mod,
-                                            char *name, char *fullname));
+static PyObject *get_parent(PyObject *globals, char *buf, int *p_buflen);
+static PyObject *load_next(PyObject *mod, PyObject *altmod,
+                          char **p_name, char *buf, int *p_buflen);
+static int mark_miss(char *name);
+static int ensure_fromlist(PyObject *mod, PyObject *fromlist,
+                          char *buf, int buflen, int recursive);
+static PyObject * import_submodule(PyObject *mod, char *name, char *fullname);
 
 /* The Magnum Opus of dotted-name import :-) */
 
@@ -2006,7 +2004,7 @@ call_find_module(name, path)
        char *name;
        PyObject *path; /* list or None or NULL */
 {
-       extern int fclose Py_PROTO((FILE *));
+       extern int fclose(FILE *);
        PyObject *fob, *ret;
        struct filedescr *fdp;
        char pathname[MAXPATHLEN+1];
index 8b2f21ec840266435ea8e860d217cfc08dd2c008..d67688adeb1828a439e5bd9bcd068008df620827 100644 (file)
@@ -36,8 +36,8 @@ struct filedescr {
 extern struct filedescr * _PyImport_Filetab;
 extern const struct filedescr _PyImport_DynLoadFiletab[];
 
-extern PyObject *_PyImport_LoadDynamicModule
-       Py_PROTO((char *name, char *pathname, FILE *));
+extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
+                                            FILE *);
 
 /* Max length of module suffix searched for -- accommodates "module.slb" */
 #define MAXSUFFIXSIZE 12
index 8fcbe3a840d4de580df4dabfaed38c4606df6ae9..78fe6242cf7433bf4928b0b4a2686a3f7ca649f0 100644 (file)
@@ -171,8 +171,7 @@ w_object(v, p)
                        w_short(ob->ob_digit[i], p);
        }
        else if (PyFloat_Check(v)) {
-               extern void PyFloat_AsString
-                       Py_PROTO((char *, PyFloatObject *));
+               extern void PyFloat_AsString(char *, PyFloatObject *);
                char buf[256]; /* Plenty to format any double */
                PyFloat_AsString(buf, (PyFloatObject *)v);
                n = strlen(buf);
@@ -182,8 +181,7 @@ w_object(v, p)
        }
 #ifndef WITHOUT_COMPLEX
        else if (PyComplex_Check(v)) {
-               extern void PyFloat_AsString
-                       Py_PROTO((char *, PyFloatObject *));
+               extern void PyFloat_AsString(char *, PyFloatObject *);
                char buf[256]; /* Plenty to format any double */
                PyFloatObject *temp;
                w_byte(TYPE_COMPLEX, p);
@@ -438,7 +436,7 @@ r_object(p)
        
        case TYPE_FLOAT:
                {
-                       extern double atof Py_PROTO((const char *));
+                       extern double atof(const char *);
                        char buf[256];
                        double dx;
                        n = r_byte(p);
@@ -457,7 +455,7 @@ r_object(p)
 #ifndef WITHOUT_COMPLEX
        case TYPE_COMPLEX:
                {
-                       extern double atof Py_PROTO((const char *));
+                       extern double atof(const char *);
                        char buf[256];
                        Py_complex c;
                        n = r_byte(p);
index 5cd28709f159971a3055428b11cae77d6e4b7311..4a4dc1b299a0ebd8a58af25fd8a2aaee1b43176f 100644 (file)
@@ -84,7 +84,7 @@ Py_InitModule4(name, methods, doc, passthrough, module_api_version)
 
 /* Helper for mkvalue() to scan the length of a format */
 
-static int countformat Py_PROTO((char *format, int endchar));
+static int countformat(char *format, int endchar);
 static int countformat(format, endchar)
        char *format;
        int endchar;
@@ -130,10 +130,10 @@ static int countformat(format, endchar)
 /* Generic function to create a value -- the inverse of getargs() */
 /* After an original idea and first implementation by Steven Miale */
 
-static PyObject *do_mktuple Py_PROTO((char**, va_list *, int, int));
-static PyObject *do_mklist Py_PROTO((char**, va_list *, int, int));
-static PyObject *do_mkdict Py_PROTO((char**, va_list *, int, int));
-static PyObject *do_mkvalue Py_PROTO((char**, va_list *));
+static PyObject *do_mktuple(char**, va_list *, int, int);
+static PyObject *do_mklist(char**, va_list *, int, int);
+static PyObject *do_mkdict(char**, va_list *, int, int);
+static PyObject *do_mkvalue(char**, va_list *);
 
 
 static PyObject *
@@ -358,7 +358,7 @@ do_mkvalue(p_format, p_va)
                case 'S':
                case 'O':
                if (**p_format == '&') {
-                       typedef PyObject *(*converter) Py_PROTO((void *));
+                       typedef PyObject *(*converter)(void *);
                        converter func = va_arg(*p_va, converter);
                        void *arg = va_arg(*p_va, void *);
                        ++*p_format;
index 1d16db5c90026a41a7a164cdc4a9b91baeefa6d9..74dffae74e8b97553619443a0fc0a7c807255c74 100644 (file)
@@ -38,18 +38,18 @@ extern char *Py_GetPath();
 extern grammar _PyParser_Grammar; /* From graminit.c */
 
 /* Forward */
-static void initmain Py_PROTO((void));
-static void initsite Py_PROTO((void));
-static PyObject *run_err_node Py_PROTO((node *n, char *filename,
-                                  PyObject *globals, PyObject *locals));
-static PyObject *run_node Py_PROTO((node *n, char *filename,
-                              PyObject *globals, PyObject *locals));
-static PyObject *run_pyc_file Py_PROTO((FILE *fp, char *filename,
-                                  PyObject *globals, PyObject *locals));
-static void err_input Py_PROTO((perrdetail *));
-static void initsigs Py_PROTO((void));
-static void call_sys_exitfunc Py_PROTO((void));
-static void call_ll_exitfuncs Py_PROTO((void));
+static void initmain(void);
+static void initsite(void);
+static PyObject *run_err_node(node *n, char *filename,
+                             PyObject *globals, PyObject *locals);
+static PyObject *run_node(node *n, char *filename,
+                         PyObject *globals, PyObject *locals);
+static PyObject *run_pyc_file(FILE *fp, char *filename,
+                             PyObject *globals, PyObject *locals);
+static void err_input(perrdetail *);
+static void initsigs(void);
+static void call_sys_exitfunc(void);
+static void call_ll_exitfuncs(void);
 
 #ifdef Py_TRACE_REFS
 int _Py_AskYesNo(char *prompt);
@@ -163,7 +163,7 @@ Py_Initialize()
 }
 
 #ifdef COUNT_ALLOCS
-extern void dump_counts Py_PROTO((void));
+extern void dump_counts(void);
 #endif
 
 /* Undo the effect of Py_Initialize().
@@ -1059,7 +1059,7 @@ static void (*exitfuncs[NEXITFUNCS])();
 static int nexitfuncs = 0;
 
 int Py_AtExit(func)
-       void (*func) Py_PROTO((void));
+       void (*func)(void);
 {
        if (nexitfuncs >= NEXITFUNCS)
                return -1;
index e0fca9535cad52b50ce9db2eb63a560beb1f9743..6ba43bd1ee632d8b15d05a5e80dc0e04b04611e7 100644 (file)
@@ -270,7 +270,7 @@ static PyObject *
 sys_getcounts(self, args)
        PyObject *self, *args;
 {
-       extern PyObject *get_counts Py_PROTO((void));
+       extern PyObject *get_counts(void);
 
        if (!PyArg_ParseTuple(args, ":getcounts"))
                return NULL;
@@ -280,12 +280,12 @@ sys_getcounts(self, args)
 
 #ifdef Py_TRACE_REFS
 /* Defined in objects.c because it uses static globals if that file */
-extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *));
+extern PyObject *_Py_GetObjects(PyObject *, PyObject *);
 #endif
 
 #ifdef DYNAMIC_EXECUTION_PROFILE
 /* Defined in ceval.c because it uses static globals if that file */
-extern PyObject *_Py_GetDXProfile Py_PROTO((PyObject *,  PyObject *));
+extern PyObject *_Py_GetDXProfile(PyObject *,  PyObject *);
 #endif
 
 static PyMethodDef sys_methods[] = {
@@ -409,7 +409,7 @@ settrace() -- set the global debug tracing function\n\
 PyObject *
 _PySys_Init()
 {
-       extern int fclose Py_PROTO((FILE *));
+       extern int fclose(FILE *);
        PyObject *m, *v, *sysdict;
        PyObject *sysin, *sysout, *syserr;
        char *s;
index 1958f2ee4119941105bf15bea9610c10b05243b1..b7bf9fda4e73e97e5649eb69eeff8996f450917e 100644 (file)
@@ -22,7 +22,7 @@ main(argc, argv)
     int argc;
     char **argv;
 {
-       extern int Py_FrozenMain Py_PROTO((int, char **));
+       extern int Py_FrozenMain(int, char **);
 """ + ((not __debug__ and """
         Py_OptimizeFlag++;
 """) or "")  + """