]> granicus.if.org Git - python/commitdiff
ANSIfication: remove very-old-varargs code, fix function declarations so
authorThomas Wouters <thomas@python.org>
Sat, 22 Jul 2000 23:59:33 +0000 (23:59 +0000)
committerThomas Wouters <thomas@python.org>
Sat, 22 Jul 2000 23:59:33 +0000 (23:59 +0000)
they include prototypes.

Objects/abstract.c
PC/WinMain.c
PC/getpathp.c
PC/os2vacpp/getpathp.c

index 1d990194d5defae7d2536b35955379f531833b7d..96b5fe81837f2865025aa7011be292a7167a22a9 100644 (file)
@@ -298,8 +298,6 @@ PyNumber_Check(PyObject *o)
 PyObject *
 PyNumber_Or(PyObject *v, PyObject *w)
 {
-        extern int PyNumber_Coerce();
-
        BINOP(v, w, "__or__", "__ror__", PyNumber_Or);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
@@ -319,8 +317,6 @@ PyNumber_Or(PyObject *v, PyObject *w)
 PyObject *
 PyNumber_Xor(PyObject *v, PyObject *w)
 {
-        extern int PyNumber_Coerce();
-
        BINOP(v, w, "__xor__", "__rxor__", PyNumber_Xor);
        if (v->ob_type->tp_as_number != NULL) {
                PyObject *x = NULL;
@@ -1391,25 +1387,11 @@ PyObject_CallObject(PyObject *o, PyObject *a)
 }
 
 PyObject *
-#ifdef HAVE_STDARG_PROTOTYPES
-/* VARARGS 2 */
 PyObject_CallFunction(PyObject *callable, char *format, ...)
-#else
-/* VARARGS */
-       PyObject_CallFunction(va_alist) va_dcl
-#endif
 {
        va_list va;
        PyObject *args, *retval;
-#ifdef HAVE_STDARG_PROTOTYPES
        va_start(va, format);
-#else
-       PyObject *callable;
-       char *format;
-       va_start(va);
-       callable = va_arg(va, PyObject *);
-       format   = va_arg(va, char *);
-#endif
 
        if (callable == NULL) {
                va_end(va);
@@ -1444,27 +1426,11 @@ PyObject_CallFunction(PyObject *callable, char *format, ...)
 }
 
 PyObject *
-#ifdef HAVE_STDARG_PROTOTYPES
-/* VARARGS 2 */
 PyObject_CallMethod(PyObject *o, char *name, char *format, ...)
-#else
-/* VARARGS */
-       PyObject_CallMethod(va_alist) va_dcl
-#endif
 {
        va_list va;
        PyObject *args, *func = 0, *retval;
-#ifdef HAVE_STDARG_PROTOTYPES
        va_start(va, format);
-#else
-       PyObject *o;
-       char *name;
-       char *format;
-       va_start(va);
-       o      = va_arg(va, PyObject *);
-       name   = va_arg(va, char *);
-       format = va_arg(va, char *);
-#endif
 
        if (o == NULL || name == NULL) {
                va_end(va);
index c3d0f2fe1ff0de6a2207d0ff46061827a32d3b83..4249567fa689c19b1d8b8f9f338db7a823edbf62 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "Python.h"
 
-extern int Py_Main();
+extern int Py_Main(int, char **);
 
 int WINAPI WinMain(
     HINSTANCE hInstance,      /* handle to current instance */
index e4ff136ea7013bcf2cbde3d49351beb15d06610e..8178ab27cff30476ae8a6fc8415d6cc370428850 100644 (file)
@@ -336,7 +336,7 @@ done:
 static void
 get_progpath(void)
 {
-       extern char *Py_GetProgramName();
+       extern char *Py_GetProgramName(void);
        char *path = getenv("PATH");
        char *prog = Py_GetProgramName();
 
index 1c78674175b76f9dba03aed6b09e3b620fc08deb..533689c63f53b8d3f27308e640ab62599061766a 100644 (file)
@@ -16,7 +16,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
 #ifdef MS_WIN32
 #include <windows.h>
-extern BOOL PyWin_IsWin32s();
+extern BOOL PyWin_IsWin32s(void);
 #endif
 
 #include <sys/types.h>
@@ -242,7 +242,7 @@ getpythonregpath(HKEY keyBase, BOOL bWin32s)
 static void
 get_progpath(void)
 {
-       extern char *Py_GetProgramName();
+       extern char *Py_GetProgramName(void);
        char *path = getenv("PATH");
        char *prog = Py_GetProgramName();