mirror of https://github.com/python/cpython
Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.
This commit is contained in:
parent
4be47c0f76
commit
dbd9ba6a6c
|
@ -76,22 +76,22 @@
|
|||
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.
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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) */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -142,7 +142,7 @@ findlabel(ll, type, str)
|
|||
}
|
||||
|
||||
/* Forward */
|
||||
static void translabel Py_PROTO((grammar *, label *));
|
||||
static void translabel(grammar *, label *);
|
||||
|
||||
void
|
||||
translatelabels(g)
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -64,7 +64,7 @@ PyNode_AddChild(n1, type, str, lineno)
|
|||
}
|
||||
|
||||
/* Forward */
|
||||
static void freechildren Py_PROTO((node *));
|
||||
static void freechildren(node *);
|
||||
|
||||
|
||||
void
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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. */
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 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 Py_PROTO((PyObject *, PyObject *,
|
||||
char *, char **, va_list *));
|
||||
static char *skipitem Py_PROTO((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++;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 "") + """
|
||||
|
|
Loading…
Reference in New Issue