Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.

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

View file

@ -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.

View 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 *);

View 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

View 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

View 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