summaryrefslogtreecommitdiffstats
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-07-22 18:47:25 (GMT)
committerThomas Wouters <thomas@python.org>2000-07-22 18:47:25 (GMT)
commitf70ef4f8606f99744252a804229d53a4d97601c1 (patch)
treebe401f2f10b39f0603e4cc0ae091335890410b7f /Python/modsupport.c
parent0452d1f316903f0553a0d92e0673ff37247cdfa5 (diff)
downloadcpython-f70ef4f8606f99744252a804229d53a4d97601c1.zip
cpython-f70ef4f8606f99744252a804229d53a4d97601c1.tar.gz
cpython-f70ef4f8606f99744252a804229d53a4d97601c1.tar.bz2
Mass ANSIfication of function definitions. Doesn't cover all 'extern'
declarations yet, those come later.
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c76
1 files changed, 8 insertions, 68 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 4a4dc1b..7dbfe1c 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -42,12 +42,8 @@ static char api_version_warning[] =
This Python has API version %d, module %s has version %d.\n";
PyObject *
-Py_InitModule4(name, methods, doc, passthrough, module_api_version)
- char *name;
- PyMethodDef *methods;
- char *doc;
- PyObject *passthrough;
- int module_api_version;
+Py_InitModule4(char *name, PyMethodDef *methods, char *doc,
+ PyObject *passthrough, int module_api_version)
{
PyObject *m, *d, *v;
PyMethodDef *ml;
@@ -84,10 +80,7 @@ Py_InitModule4(name, methods, doc, passthrough, module_api_version)
/* Helper for mkvalue() to scan the length of a format */
-static int countformat(char *format, int endchar);
-static int countformat(format, endchar)
- char *format;
- int endchar;
+static int countformat(char *format, int endchar)
{
int count = 0;
int level = 0;
@@ -137,11 +130,7 @@ static PyObject *do_mkvalue(char**, va_list *);
static PyObject *
-do_mkdict(p_format, p_va, endchar, n)
- char **p_format;
- va_list *p_va;
- int endchar;
- int n;
+do_mkdict(char **p_format, va_list *p_va, int endchar, int n)
{
PyObject *d;
int i;
@@ -183,11 +172,7 @@ do_mkdict(p_format, p_va, endchar, n)
}
static PyObject *
-do_mklist(p_format, p_va, endchar, n)
- char **p_format;
- va_list *p_va;
- int endchar;
- int n;
+do_mklist(char **p_format, va_list *p_va, int endchar, int n)
{
PyObject *v;
int i;
@@ -224,11 +209,7 @@ _ustrlen(Py_UNICODE *u)
}
static PyObject *
-do_mktuple(p_format, p_va, endchar, n)
- char **p_format;
- va_list *p_va;
- int endchar;
- int n;
+do_mktuple(char **p_format, va_list *p_va, int endchar, int n)
{
PyObject *v;
int i;
@@ -256,9 +237,7 @@ do_mktuple(p_format, p_va, endchar, n)
}
static PyObject *
-do_mkvalue(p_format, p_va)
- char **p_format;
- va_list *p_va;
+do_mkvalue(char **p_format, va_list *p_va)
{
for (;;) {
switch (*(*p_format)++) {
@@ -401,32 +380,18 @@ do_mkvalue(p_format, p_va)
}
-#ifdef HAVE_STDARG_PROTOTYPES
-/* VARARGS 2 */
PyObject *Py_BuildValue(char *format, ...)
-#else
-/* VARARGS */
-PyObject *Py_BuildValue(va_alist) va_dcl
-#endif
{
va_list va;
PyObject* retval;
-#ifdef HAVE_STDARG_PROTOTYPES
va_start(va, format);
-#else
- char *format;
- va_start(va);
- format = va_arg(va, char *);
-#endif
retval = Py_VaBuildValue(format, va);
va_end(va);
return retval;
}
PyObject *
-Py_VaBuildValue(format, va)
- char *format;
- va_list va;
+Py_VaBuildValue(char *format, va_list va)
{
char *f = format;
int n = countformat(f, '\0');
@@ -450,26 +415,14 @@ Py_VaBuildValue(format, va)
}
-#ifdef HAVE_STDARG_PROTOTYPES
PyObject *
PyEval_CallFunction(PyObject *obj, char *format, ...)
-#else
-PyObject *
-PyEval_CallFunction(obj, format, va_alist)
- PyObject *obj;
- char *format;
- va_dcl
-#endif
{
va_list vargs;
PyObject *args;
PyObject *res;
-#ifdef HAVE_STDARG_PROTOTYPES
va_start(vargs, format);
-#else
- va_start(vargs);
-#endif
args = Py_VaBuildValue(format, vargs);
va_end(vargs);
@@ -484,17 +437,8 @@ PyEval_CallFunction(obj, format, va_alist)
}
-#ifdef HAVE_STDARG_PROTOTYPES
PyObject *
PyEval_CallMethod(PyObject *obj, char *methodname, char *format, ...)
-#else
-PyObject *
-PyEval_CallMethod(obj, methodname, format, va_alist)
- PyObject *obj;
- char *methodname;
- char *format;
- va_dcl
-#endif
{
va_list vargs;
PyObject *meth;
@@ -505,11 +449,7 @@ PyEval_CallMethod(obj, methodname, format, va_alist)
if (meth == NULL)
return NULL;
-#ifdef HAVE_STDARG_PROTOTYPES
va_start(vargs, format);
-#else
- va_start(vargs);
-#endif
args = Py_VaBuildValue(format, vargs);
va_end(vargs);