diff options
author | Tim Peters <tim.peters@gmail.com> | 2000-07-09 03:09:57 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2000-07-09 03:09:57 (GMT) |
commit | dbd9ba6a6c19c3d06f5684b3384a934f740038db (patch) | |
tree | 3a2728dbc98c86a0af47d7692cb8bdd2ee41afca /Python | |
parent | 4be47c0f76c349ee9c04b08ed122c8bd8190d2c5 (diff) | |
download | cpython-dbd9ba6a6c19c3d06f5684b3384a934f740038db.zip cpython-dbd9ba6a6c19c3d06f5684b3384a934f740038db.tar.gz cpython-dbd9ba6a6c19c3d06f5684b3384a934f740038db.tar.bz2 |
Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 8 | ||||
-rw-r--r-- | Python/ceval.c | 60 | ||||
-rw-r--r-- | Python/compile.c | 58 | ||||
-rw-r--r-- | Python/errors.c | 4 | ||||
-rw-r--r-- | Python/getargs.c | 39 | ||||
-rw-r--r-- | Python/import.c | 30 | ||||
-rw-r--r-- | Python/importdl.h | 4 | ||||
-rw-r--r-- | Python/marshal.c | 10 | ||||
-rw-r--r-- | Python/modsupport.c | 12 | ||||
-rw-r--r-- | Python/pythonrun.c | 28 | ||||
-rw-r--r-- | Python/sysmodule.c | 8 |
11 files changed, 126 insertions, 135 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 2bae3eb..a00cd5d 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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) diff --git a/Python/ceval.c b/Python/ceval.c index dfd4776..0bf5d00 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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 * diff --git a/Python/compile.c b/Python/compile.c index ce7c0e4..8cf85a7 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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) diff --git a/Python/errors.c b/Python/errors.c index d2aa3dd..4a3573e 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -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 diff --git a/Python/getargs.c b/Python/getargs.c index a28354d..ba855af 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -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++; diff --git a/Python/import.c b/Python/import.c index 7e74f2b..f1efccb 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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]; diff --git a/Python/importdl.h b/Python/importdl.h index 8b2f21e..d67688a 100644 --- a/Python/importdl.h +++ b/Python/importdl.h @@ -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 diff --git a/Python/marshal.c b/Python/marshal.c index 8fcbe3a..78fe624 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -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); diff --git a/Python/modsupport.c b/Python/modsupport.c index 5cd2870..4a4dc1b 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -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; diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 1d16db5..74dffae 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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; diff --git a/Python/sysmodule.c b/Python/sysmodule.c index e0fca95..6ba43bd 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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; |