summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-07-21 06:00:07 +0000
committerThomas Wouters <thomas@python.org>2000-07-21 06:00:07 +0000
commitf3f33dcf03eaed3c4e720178f9d69205a66d6a91 (patch)
tree3365212ce8b6f11765dfd8cbc774c0c8b2f9260e
parentff4df6d6fbeac136053ba4f9b7ac567fbf39e6be (diff)
downloadcpython-git-f3f33dcf03eaed3c4e720178f9d69205a66d6a91.tar.gz
Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
-rw-r--r--Modules/_codecsmodule.c2
-rw-r--r--Modules/_cursesmodule.c6
-rw-r--r--Modules/_localemodule.c2
-rw-r--r--Modules/_sre.c2
-rw-r--r--Modules/_tkinter.c14
-rw-r--r--Modules/almodule.c2
-rw-r--r--Modules/arraymodule.c2
-rw-r--r--Modules/audioop.c10
-rw-r--r--Modules/binascii.c2
-rw-r--r--Modules/cdmodule.c2
-rw-r--r--Modules/clmodule.c2
-rw-r--r--Modules/cmathmodule.c4
-rw-r--r--Modules/cryptmodule.c2
-rw-r--r--Modules/dlmodule.c2
-rw-r--r--Modules/errnomodule.c2
-rw-r--r--Modules/fcntlmodule.c2
-rw-r--r--Modules/flmodule.c2
-rw-r--r--Modules/fmmodule.c2
-rw-r--r--Modules/getbuildinfo.c2
-rw-r--r--Modules/getpath.c10
-rw-r--r--Modules/glmodule.c2
-rw-r--r--Modules/grpmodule.c2
-rw-r--r--Modules/imageop.c2
-rw-r--r--Modules/imgfile.c2
-rw-r--r--Modules/linuxaudiodev.c2
-rw-r--r--Modules/mathmodule.c4
-rw-r--r--Modules/md5module.c4
-rw-r--r--Modules/mpzmodule.c7
-rw-r--r--Modules/newmodule.c2
-rw-r--r--Modules/nismodule.c4
-rw-r--r--Modules/operator.c2
-rw-r--r--Modules/pcremodule.c2
-rw-r--r--Modules/posixmodule.c15
-rw-r--r--Modules/pwdmodule.c2
-rw-r--r--Modules/readline.c4
-rw-r--r--Modules/regexmodule.c2
-rw-r--r--Modules/regexpr.c2
-rw-r--r--Modules/resource.c2
-rw-r--r--Modules/rgbimgmodule.c2
-rw-r--r--Modules/rotormodule.c2
-rw-r--r--Modules/selectmodule.c2
-rw-r--r--Modules/sgimodule.c2
-rw-r--r--Modules/shamodule.c4
-rw-r--r--Modules/signalmodule.c16
-rw-r--r--Modules/socketmodule.c14
-rw-r--r--Modules/soundex.c2
-rw-r--r--Modules/stropmodule.c2
-rw-r--r--Modules/structmodule.c2
-rw-r--r--Modules/sunaudiodev.c2
-rw-r--r--Modules/svmodule.c4
-rw-r--r--Modules/syslogmodule.c2
-rw-r--r--Modules/tclNotify.c8
-rw-r--r--Modules/termios.c2
-rw-r--r--Modules/threadmodule.c4
-rw-r--r--Modules/timemodule.c6
-rw-r--r--Modules/timingmodule.c2
-rw-r--r--Modules/unicodedata.c2
-rw-r--r--Modules/xxmodule.c2
-rw-r--r--Modules/zlibmodule.c2
59 files changed, 103 insertions, 117 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c
index a7be915747..3b117e6966 100644
--- a/Modules/_codecsmodule.c
+++ b/Modules/_codecsmodule.c
@@ -624,7 +624,7 @@ static PyMethodDef _codecs_functions[] = {
};
DL_EXPORT(void)
-init_codecs()
+init_codecs(void)
{
Py_InitModule("_codecs", _codecs_functions);
}
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index a9b71a1605..b220c942a1 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -1270,9 +1270,7 @@ static PyMethodDef PyCursesWindow_Methods[] = {
};
static PyObject *
-PyCursesWindow_GetAttr(self, name)
- PyCursesWindowObject *self;
- char *name;
+PyCursesWindow_GetAttr(PyCursesWindowObject *self, char *name)
{
return Py_FindMethod(PyCursesWindow_Methods, (PyObject *)self, name);
}
@@ -2161,7 +2159,7 @@ static PyMethodDef PyCurses_methods[] = {
/* Initialization function for the module */
void
-init_curses()
+init_curses(void)
{
PyObject *m, *d, *v;
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index e32e81bd3b..4362ffd3b5 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -400,7 +400,7 @@ static struct PyMethodDef PyLocale_Methods[] = {
};
DL_EXPORT(void)
-init_locale()
+init_locale(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 5beb3ea024..e7313917fd 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2097,7 +2097,7 @@ void
#if defined(WIN32)
__declspec(dllexport)
#endif
-init_sre()
+init_sre(void)
{
/* Patch object types */
Pattern_Type.ob_type = Match_Type.ob_type =
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 0383f1eaca..f61b0ded1e 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1912,9 +1912,7 @@ Tkinter_Flatten(PyObject* self, PyObject* args)
}
static PyObject *
-Tkinter_Create(self, args)
- PyObject *self;
- PyObject *args;
+Tkinter_Create(PyObject *self, PyObject *args)
{
char *screenName = NULL;
char *baseName = NULL;
@@ -1967,7 +1965,7 @@ MyFileProc(void *clientData, int mask)
static PyThreadState *event_tstate = NULL;
static int
-EventHook()
+EventHook(void)
{
#ifndef MS_WINDOWS
int tfile;
@@ -2026,7 +2024,7 @@ EventHook()
#endif
static void
-EnableEventHook()
+EnableEventHook(void)
{
#ifdef WAIT_FOR_STDIN
if (PyOS_InputHook == NULL) {
@@ -2039,7 +2037,7 @@ EnableEventHook()
}
static void
-DisableEventHook()
+DisableEventHook(void)
{
#ifdef WAIT_FOR_STDIN
if (Tk_GetNumMainWindows() == 0 && PyOS_InputHook == EventHook) {
@@ -2071,7 +2069,7 @@ ins_string(PyObject *d, char *name, char *val)
DL_EXPORT(void)
-init_tkinter()
+init_tkinter(void)
{
PyObject *m, *d;
@@ -2218,7 +2216,7 @@ init_tkinter_shlib(CFragInitBlockPtr data)
** the resources from the application. Again, we ignore errors.
*/
static
-mac_addlibresources()
+mac_addlibresources(void)
{
if ( !loaded_from_shlib )
return;
diff --git a/Modules/almodule.c b/Modules/almodule.c
index 84a989541c..f162cf5b45 100644
--- a/Modules/almodule.c
+++ b/Modules/almodule.c
@@ -2037,7 +2037,7 @@ static char al_module_documentation[] =
;
void
-inital()
+inital(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 10c8f57e7c..55a0dce0df 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1407,7 +1407,7 @@ statichere PyTypeObject Arraytype = {
};
DL_EXPORT(void)
-initarray()
+initarray(void)
{
PyObject *m, *d;
diff --git a/Modules/audioop.c b/Modules/audioop.c
index 73612cbde7..08e8fd43eb 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -284,10 +284,7 @@ audioop_rms(PyObject *self, PyObject *args)
return PyInt_FromLong(val);
}
-static double _sum2(a, b, len)
- short *a;
- short *b;
- int len;
+static double _sum2(short *a, short *b, int len)
{
int i;
double sum = 0.0;
@@ -899,8 +896,7 @@ audioop_lin2lin(PyObject *self, PyObject *args)
}
static int
-gcd(a, b)
- int a, b;
+gcd(int a, int b)
{
while (b > 0) {
int tmp = a % b;
@@ -1344,7 +1340,7 @@ static PyMethodDef audioop_methods[] = {
};
DL_EXPORT(void)
-initaudioop()
+initaudioop(void)
{
PyObject *m, *d;
m = Py_InitModule("audioop", audioop_methods);
diff --git a/Modules/binascii.c b/Modules/binascii.c
index fca4ca09d8..5c9944ac5e 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -899,7 +899,7 @@ static struct PyMethodDef binascii_module_methods[] = {
static char doc_binascii[] = "Conversion between binary data and ASCII";
DL_EXPORT(void)
-initbinascii()
+initbinascii(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/cdmodule.c b/Modules/cdmodule.c
index a7cfb5428a..8042075724 100644
--- a/Modules/cdmodule.c
+++ b/Modules/cdmodule.c
@@ -766,7 +766,7 @@ static PyMethodDef CD_methods[] = {
};
void
-initcd()
+initcd(void)
{
PyObject *m, *d;
diff --git a/Modules/clmodule.c b/Modules/clmodule.c
index ff4c1593b3..d38a0c33e0 100644
--- a/Modules/clmodule.c
+++ b/Modules/clmodule.c
@@ -978,7 +978,7 @@ static PyMethodDef cl_methods[] = {
#endif
void
-initcl()
+initcl(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index d110521309..b6a6585761 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -316,7 +316,7 @@ Return the hyperbolic tangent of x.";
/* And now the glue to make them available from Python: */
static PyObject *
-math_error()
+math_error(void)
{
if (errno == EDOM)
PyErr_SetString(PyExc_ValueError, "math domain error");
@@ -394,7 +394,7 @@ static PyMethodDef cmath_methods[] = {
};
DL_EXPORT(void)
-initcmath()
+initcmath(void)
{
PyObject *m, *d, *v;
diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c
index 2c043f9418..770965e505 100644
--- a/Modules/cryptmodule.c
+++ b/Modules/cryptmodule.c
@@ -36,7 +36,7 @@ static PyMethodDef crypt_methods[] = {
};
DL_EXPORT(void)
-initcrypt()
+initcrypt(void)
{
Py_InitModule("crypt", crypt_methods);
}
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
index 169f49c413..09bd9d30e1 100644
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -191,7 +191,7 @@ static PyMethodDef dl_methods[] = {
};
void
-initdl()
+initdl(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c
index a364bf2c5c..8607ea2565 100644
--- a/Modules/errnomodule.c
+++ b/Modules/errnomodule.c
@@ -70,7 +70,7 @@ To map error codes to error messages, use the function os.strerror(),\n\
e.g. os.strerror(2) could return 'No such file or directory'.";
DL_EXPORT(void)
-initerrno()
+initerrno(void)
{
PyObject *m, *d, *de;
m = Py_InitModule3("errno", errno_methods, errno__doc__);
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 37ea9ebebf..1483847fb8 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -312,7 +312,7 @@ all_ins(PyObject* d)
}
DL_EXPORT(void)
-initfcntl()
+initfcntl(void)
{
PyObject *m, *d;
diff --git a/Modules/flmodule.c b/Modules/flmodule.c
index e2aa6a1501..ffb4d4d596 100644
--- a/Modules/flmodule.c
+++ b/Modules/flmodule.c
@@ -2133,7 +2133,7 @@ static PyMethodDef forms_methods[] = {
};
DL_EXPORT(void)
-initfl()
+initfl(void)
{
Py_InitModule("fl", forms_methods);
foreground();
diff --git a/Modules/fmmodule.c b/Modules/fmmodule.c
index 18c1aceb8d..df5f27ba67 100644
--- a/Modules/fmmodule.c
+++ b/Modules/fmmodule.c
@@ -278,7 +278,7 @@ static PyMethodDef fm_methods[] = {
void
-initfm()
+initfm(void)
{
Py_InitModule("fm", fm_methods);
fminit();
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index 35da3f7ad6..8c710f8fd0 100644
--- a/Modules/getbuildinfo.c
+++ b/Modules/getbuildinfo.c
@@ -30,7 +30,7 @@
const char *
-Py_GetBuildInfo()
+Py_GetBuildInfo(void)
{
static char buildinfo[50];
sprintf(buildinfo, "#%d, %.20s, %.9s", BUILD, DATE, TIME);
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 0807fa3965..3c418d6c87 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -347,7 +347,7 @@ search_for_exec_prefix(char *argv0_path, char *home)
static void
-calculate_path()
+calculate_path(void)
{
extern char *Py_GetProgramName();
@@ -572,7 +572,7 @@ calculate_path()
/* External interface */
char *
-Py_GetPath()
+Py_GetPath(void)
{
if (!module_search_path)
calculate_path();
@@ -580,7 +580,7 @@ Py_GetPath()
}
char *
-Py_GetPrefix()
+Py_GetPrefix(void)
{
if (!module_search_path)
calculate_path();
@@ -588,7 +588,7 @@ Py_GetPrefix()
}
char *
-Py_GetExecPrefix()
+Py_GetExecPrefix(void)
{
if (!module_search_path)
calculate_path();
@@ -596,7 +596,7 @@ Py_GetExecPrefix()
}
char *
-Py_GetProgramFullPath()
+Py_GetProgramFullPath(void)
{
if (!module_search_path)
calculate_path();
diff --git a/Modules/glmodule.c b/Modules/glmodule.c
index baeb29458b..2d314b9e5f 100644
--- a/Modules/glmodule.c
+++ b/Modules/glmodule.c
@@ -7633,7 +7633,7 @@ static struct PyMethodDef gl_methods[] = {
};
void
-initgl()
+initgl(void)
{
(void) Py_InitModule("gl", gl_methods);
}
diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c
index ef2f0f0141..f13472f29b 100644
--- a/Modules/grpmodule.c
+++ b/Modules/grpmodule.c
@@ -132,7 +132,7 @@ complete membership information.)";
DL_EXPORT(void)
-initgrp()
+initgrp(void)
{
Py_InitModule3("grp", grp_methods, grp__doc__);
}
diff --git a/Modules/imageop.c b/Modules/imageop.c
index e22c96f7a2..7c7116d6cb 100644
--- a/Modules/imageop.c
+++ b/Modules/imageop.c
@@ -706,7 +706,7 @@ static PyMethodDef imageop_methods[] = {
DL_EXPORT(void)
-initimageop()
+initimageop(void)
{
PyObject *m, *d;
m = Py_InitModule("imageop", imageop_methods);
diff --git a/Modules/imgfile.c b/Modules/imgfile.c
index e1e798fdfd..9a7f74fd3d 100644
--- a/Modules/imgfile.c
+++ b/Modules/imgfile.c
@@ -509,7 +509,7 @@ static PyMethodDef imgfile_methods[] = {
void
-initimgfile()
+initimgfile(void)
{
PyObject *m, *d;
m = Py_InitModule("imgfile", imgfile_methods);
diff --git a/Modules/linuxaudiodev.c b/Modules/linuxaudiodev.c
index 6a1c5ffe15..b0677efb33 100644
--- a/Modules/linuxaudiodev.c
+++ b/Modules/linuxaudiodev.c
@@ -384,7 +384,7 @@ static PyMethodDef linuxaudiodev_methods[] = {
};
void
-initlinuxaudiodev()
+initlinuxaudiodev(void)
{
PyObject *m, *d, *x;
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index a20197a96e..2aa0071713 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -38,7 +38,7 @@ extern double modf (double, double *);
#endif
static PyObject *
-math_error()
+math_error(void)
{
if (errno == EDOM)
PyErr_SetString(PyExc_ValueError, "math domain error");
@@ -259,7 +259,7 @@ static char module_doc [] =
mathematical functions defined by the C standard.";
DL_EXPORT(void)
-initmath()
+initmath(void)
{
PyObject *m, *d, *v;
diff --git a/Modules/md5module.c b/Modules/md5module.c
index e3d580433f..59e4c6c269 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -31,7 +31,7 @@ staticforward PyTypeObject MD5type;
#define is_md5object(v) ((v)->ob_type == &MD5type)
static md5object *
-newmd5object()
+newmd5object(void)
{
md5object *md5p;
@@ -236,7 +236,7 @@ static PyMethodDef md5_functions[] = {
/* Initialize this module. */
DL_EXPORT(void)
-initmd5()
+initmd5(void)
{
PyObject *m, *d;
diff --git a/Modules/mpzmodule.c b/Modules/mpzmodule.c
index d4882c258a..ad5273677f 100644
--- a/Modules/mpzmodule.c
+++ b/Modules/mpzmodule.c
@@ -94,7 +94,7 @@ static const char initialiser_name[] = "mpz";
/* #define MPZ_DEBUG */
static mpzobject *
-newmpzobject()
+newmpzobject(void)
{
mpzobject *mpzp;
@@ -1632,8 +1632,7 @@ static PyMethodDef mpz_functions[] = {
#ifdef MP_TEST_ALLOC
#define MP_TEST_SIZE 4
static const char mp_test_magic[MP_TEST_SIZE] = {'\xAA','\xAA','\xAA','\xAA'};
-static mp_test_error( location )
- int *location;
+static mp_test_error(int *location)
{
/* assumptions: *alloc returns address divisible by 4,
mpz_* routines allocate in chunks divisible by four */
@@ -1716,7 +1715,7 @@ void mp_free(void *ptr, size_t size)
/* Initialize this module. */
DL_EXPORT(void)
-initmpz()
+initmpz(void)
{
PyObject *module;
PyObject *dict;
diff --git a/Modules/newmodule.c b/Modules/newmodule.c
index e8c758c0ea..3ebac7fb29 100644
--- a/Modules/newmodule.c
+++ b/Modules/newmodule.c
@@ -195,7 +195,7 @@ char new_doc[] =
You need to know a great deal about the interpreter to use this!";
DL_EXPORT(void)
-initnew()
+initnew(void)
{
Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL,
PYTHON_API_VERSION);
diff --git a/Modules/nismodule.c b/Modules/nismodule.c
index 616f38b216..3649fd529e 100644
--- a/Modules/nismodule.c
+++ b/Modules/nismodule.c
@@ -295,7 +295,7 @@ nisproc_maplist_2(domainname *argp, CLIENT *clnt)
static
nismaplist *
-nis_maplist ()
+nis_maplist (void)
{
nisresp_maplist *list;
char *dom;
@@ -371,7 +371,7 @@ static PyMethodDef nis_methods[] = {
};
void
-initnis ()
+initnis (void)
{
PyObject *m, *d;
m = Py_InitModule("nis", nis_methods);
diff --git a/Modules/operator.c b/Modules/operator.c
index 46e5b516a1..b8bab5984f 100644
--- a/Modules/operator.c
+++ b/Modules/operator.c
@@ -247,7 +247,7 @@ spam2(delslice,__delslice__,
/* Initialization function for the module (*must* be called initoperator) */
DL_EXPORT(void)
-initoperator()
+initoperator(void)
{
/* Create the module and add the functions */
Py_InitModule4("operator", operator_methods, operator_doc,
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c
index 99c67583af..3043405b08 100644
--- a/Modules/pcremodule.c
+++ b/Modules/pcremodule.c
@@ -629,7 +629,7 @@ insint(PyObject *d, char *name, int value)
/* Initialization function for the module (*must* be called initpcre) */
DL_EXPORT(void)
-initpcre()
+initpcre(void)
{
PyObject *m, *d;
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 7413cfeafa..f39a241bc2 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -284,7 +284,7 @@ extern char **environ;
#endif /* !_MSC_VER */
static PyObject *
-convertenviron()
+convertenviron(void)
{
PyObject *d;
char **e;
@@ -344,7 +344,7 @@ convertenviron()
/* Set a POSIX-specific error from errno, and return NULL */
static PyObject *
-posix_error()
+posix_error(void)
{
return PyErr_SetFromErrno(PyExc_OSError);
}
@@ -1916,9 +1916,7 @@ static char posix_getppid__doc__[] =
Return the parent's process id.";
static PyObject *
-posix_getppid(self, args)
- PyObject *self;
- PyObject *args;
+posix_getppid(PyObject *self, PyObject *args)
{
if (!PyArg_ParseTuple(args, ":getppid"))
return NULL;
@@ -2856,7 +2854,7 @@ posix_symlink(PyObject *self, PyObject *args)
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
static long
-system_uptime()
+system_uptime(void)
{
ULONG value = 0;
@@ -5196,8 +5194,7 @@ static int insertvalues(PyObject *d)
#endif
static int
-all_ins(d)
- PyObject* d;
+all_ins(PyObject *d)
{
#ifdef F_OK
if (ins(d, "F_OK", (long)F_OK)) return -1;
@@ -5295,7 +5292,7 @@ all_ins(d)
#endif
DL_EXPORT(void)
-INITFUNC()
+INITFUNC(void)
{
PyObject *m, *d, *v;
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index c03dce8b83..ada9e6df48 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -137,7 +137,7 @@ static PyMethodDef pwd_methods[] = {
};
DL_EXPORT(void)
-initpwd()
+initpwd(void)
{
Py_InitModule4("pwd", pwd_methods, pwd__doc__,
(PyObject *)NULL, PYTHON_API_VERSION);
diff --git a/Modules/readline.c b/Modules/readline.c
index 119f7f9a35..a0a88eb723 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -396,7 +396,7 @@ flex_complete(char *text, int start, int end)
/* Helper to initialize GNU readline properly. */
static void
-setup_readline()
+setup_readline(void)
{
rl_readline_name = "python";
/* Force rebind of TAB to insert-tab */
@@ -485,7 +485,7 @@ static char doc_module[] =
"Importing this module enables command line editing using GNU readline.";
DL_EXPORT(void)
-initreadline()
+initreadline(void)
{
PyObject *m;
diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c
index 5b284c6176..ff3b8950dd 100644
--- a/Modules/regexmodule.c
+++ b/Modules/regexmodule.c
@@ -657,7 +657,7 @@ static struct PyMethodDef regex_global_methods[] = {
};
DL_EXPORT(void)
-initregex()
+initregex(void)
{
PyObject *m, *d, *v;
int i;
diff --git a/Modules/regexpr.c b/Modules/regexpr.c
index 70b7ee14bb..8b3658005f 100644
--- a/Modules/regexpr.c
+++ b/Modules/regexpr.c
@@ -446,7 +446,7 @@ static int regexp_ansi_sequences;
unsigned char re_syntax_table[256];
-void re_compile_initialize()
+void re_compile_initialize(void)
{
int a;
diff --git a/Modules/resource.c b/Modules/resource.c
index c0f52cf571..9da87af88d 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -183,7 +183,7 @@ ins(PyObject *dict, char *name, int value)
/* errors will be checked by initresource() */
}
-void initresource()
+void initresource(void)
{
PyObject *m, *d;
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c
index a883f6aac0..c8c42c2ac0 100644
--- a/Modules/rgbimgmodule.c
+++ b/Modules/rgbimgmodule.c
@@ -755,7 +755,7 @@ rgbimg_methods[] = {
DL_EXPORT(void)
-initrgbimg()
+initrgbimg(void)
{
PyObject *m, *d;
m = Py_InitModule("rgbimg", rgbimg_methods);
diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c
index 6c0aff674d..393e73a11d 100644
--- a/Modules/rotormodule.c
+++ b/Modules/rotormodule.c
@@ -618,7 +618,7 @@ rotor_methods[] = {
DL_EXPORT(void)
-initrotor()
+initrotor(void)
{
(void)Py_InitModule("rotor", rotor_methods);
}
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 8f73d38524..674a73864d 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -337,7 +337,7 @@ static char module_doc[] =
On Windows, only sockets are supported; on Unix, all file descriptors.";
DL_EXPORT(void)
-initselect()
+initselect(void)
{
PyObject *m, *d;
m = Py_InitModule3("select", select_methods, module_doc);
diff --git a/Modules/sgimodule.c b/Modules/sgimodule.c
index 0f1ec9e12e..04bd3bec3c 100644
--- a/Modules/sgimodule.c
+++ b/Modules/sgimodule.c
@@ -59,7 +59,7 @@ static PyMethodDef sgi_methods[] = {
void
-initsgi()
+initsgi(void)
{
Py_InitModule("sgi", sgi_methods);
}
diff --git a/Modules/shamodule.c b/Modules/shamodule.c
index 91ff9ff974..d45dd8964a 100644
--- a/Modules/shamodule.c
+++ b/Modules/shamodule.c
@@ -350,7 +350,7 @@ staticforward PyTypeObject SHAtype;
static SHAobject *
-newSHAobject()
+newSHAobject(void)
{
return (SHAobject *)PyObject_New(SHAobject, &SHAtype);
}
@@ -538,7 +538,7 @@ static struct PyMethodDef SHA_functions[] = {
Py_XDECREF(o); }
void
-initsha()
+initsha(void)
{
PyObject *d, *m;
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 47151eb991..757fe787af 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -312,7 +312,7 @@ A signal handler function is called with two arguments:\n\
the first is the signal number, the second is the interrupted stack frame.";
DL_EXPORT(void)
-initsignal()
+initsignal(void)
{
PyObject *m, *d, *x;
int i;
@@ -553,7 +553,7 @@ initsignal()
}
static void
-finisignal()
+finisignal(void)
{
int i;
PyObject *func;
@@ -583,7 +583,7 @@ finisignal()
/* Declared in pyerrors.h */
int
-PyErr_CheckSignals()
+PyErr_CheckSignals(void)
{
int i;
PyObject *f;
@@ -623,7 +623,7 @@ PyErr_CheckSignals()
* Declared in pyerrors.h
*/
void
-PyErr_SetInterrupt()
+PyErr_SetInterrupt(void)
{
is_tripped++;
Handlers[SIGINT].tripped = 1;
@@ -631,20 +631,20 @@ PyErr_SetInterrupt()
}
void
-PyOS_InitInterrupts()
+PyOS_InitInterrupts(void)
{
initsignal();
_PyImport_FixupExtension("signal", "signal");
}
void
-PyOS_FiniInterrupts()
+PyOS_FiniInterrupts(void)
{
finisignal();
}
int
-PyOS_InterruptOccurred()
+PyOS_InterruptOccurred(void)
{
if (Handlers[SIGINT].tripped) {
#ifdef WITH_THREAD
@@ -658,7 +658,7 @@ PyOS_InterruptOccurred()
}
void
-PyOS_AfterFork()
+PyOS_AfterFork(void)
{
#ifdef WITH_THREAD
main_thread = PyThread_get_thread_ident();
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 56e30d1398..50cd3eb109 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -228,7 +228,7 @@ static PyObject *SSLErrorObject;
and return a NULL pointer from a function. */
static PyObject *
-PySocket_Err()
+PySocket_Err(void)
{
#ifdef MS_WINDOWS
if (WSAGetLastError()) {
@@ -1437,9 +1437,7 @@ Return the IP address (a string of the form '255.255.255.255') for a host.";
/* Convenience function common to gethostbyname_ex and gethostbyaddr */
static PyObject *
-gethost_common(h, addr)
- struct hostent *h;
- struct sockaddr_in *addr;
+gethost_common(struct hostent *h, struct sockaddr_in *addr)
{
char **pch;
PyObject *rtn_tuple = (PyObject *)NULL;
@@ -2185,13 +2183,13 @@ insint(PyObject *d, char *name, int value)
/* Additional initialization and cleanup for NT/Windows */
static void
-NTcleanup()
+NTcleanup(void)
{
WSACleanup();
}
static int
-NTinit()
+NTinit(void)
{
WSADATA WSAData;
int ret;
@@ -2225,13 +2223,13 @@ NTinit()
/* Additional initialization and cleanup for OS/2 */
static void
-OS2cleanup()
+OS2cleanup(void)
{
/* No cleanup is necessary for OS/2 Sockets */
}
static int
-OS2init()
+OS2init(void)
{
char reason[64];
int rc = sock_init();
diff --git a/Modules/soundex.c b/Modules/soundex.c
index e905fe09c8..acb3344221 100644
--- a/Modules/soundex.c
+++ b/Modules/soundex.c
@@ -167,7 +167,7 @@ static PyMethodDef SoundexMethods[] =
/* Register the method table.
*/
DL_EXPORT(void)
-initsoundex()
+initsoundex(void)
{
(void) Py_InitModule4("soundex",
SoundexMethods,
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c
index 62a17a37dc..0ec9e3dd65 100644
--- a/Modules/stropmodule.c
+++ b/Modules/stropmodule.c
@@ -1180,7 +1180,7 @@ strop_methods[] = {
DL_EXPORT(void)
-initstrop()
+initstrop(void)
{
PyObject *m, *d, *s;
char buf[256];
diff --git a/Modules/structmodule.c b/Modules/structmodule.c
index a2b4096509..12759553c3 100644
--- a/Modules/structmodule.c
+++ b/Modules/structmodule.c
@@ -1222,7 +1222,7 @@ static PyMethodDef struct_methods[] = {
/* Module initialization */
DL_EXPORT(void)
-initstruct()
+initstruct(void)
{
PyObject *m, *d;
diff --git a/Modules/sunaudiodev.c b/Modules/sunaudiodev.c
index d4e5ec91b3..4f9d2bb335 100644
--- a/Modules/sunaudiodev.c
+++ b/Modules/sunaudiodev.c
@@ -482,7 +482,7 @@ static PyMethodDef sunaudiodev_methods[] = {
};
void
-initsunaudiodev()
+initsunaudiodev(void)
{
PyObject *m, *d;
diff --git a/Modules/svmodule.c b/Modules/svmodule.c
index ffbea11e4e..95b3e142ad 100644
--- a/Modules/svmodule.c
+++ b/Modules/svmodule.c
@@ -41,7 +41,7 @@ static PyObject *newcaptureobject(svobject *, void *, int);
/* Set a SV-specific error from svideo_errno and return NULL */
static PyObject *
-sv_error()
+sv_error(void)
{
PyErr_SetString(SvError, svStrerror(svideo_errno));
return NULL;
@@ -961,7 +961,7 @@ static PyMethodDef sv_methods[] = {
};
void
-initsv()
+initsv(void)
{
PyObject *m, *d;
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c
index 2381ff8ccb..6452620d36 100644
--- a/Modules/syslogmodule.c
+++ b/Modules/syslogmodule.c
@@ -168,7 +168,7 @@ ins(PyObject *d, char *s, long x)
/* Initialization function for the module */
DL_EXPORT(void)
-initsyslog()
+initsyslog(void)
{
PyObject *m, *d;
diff --git a/Modules/tclNotify.c b/Modules/tclNotify.c
index 422c944f1c..7a4e7c0c8d 100644
--- a/Modules/tclNotify.c
+++ b/Modules/tclNotify.c
@@ -100,7 +100,7 @@ static void NotifierExitHandler _ANSI_ARGS_((ClientData clientData));
*/
static void
-InitNotifier()
+InitNotifier(void)
{
initialized = 1;
memset(&notifier, 0, sizeof(notifier));
@@ -507,7 +507,7 @@ Tcl_ServiceEvent(flags)
*/
int
-Tcl_GetServiceMode()
+Tcl_GetServiceMode(void)
{
if (!initialized) {
InitNotifier();
@@ -799,7 +799,7 @@ Tcl_DoOneEvent(flags)
*/
int
-Tcl_ServiceAll()
+Tcl_ServiceAll(void)
{
int result = 0;
EventSource *sourcePtr;
@@ -894,7 +894,7 @@ Tcl_ServiceAll()
*/
int
-PyTcl_WaitUntilEvent()
+PyTcl_WaitUntilEvent(void)
{
int flags = TCL_ALL_EVENTS;
int result = 0, oldMode;
diff --git a/Modules/termios.c b/Modules/termios.c
index 80d41de99c..0dbb25776b 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -288,7 +288,7 @@ static PyMethodDef termios_methods[] =
};
DL_EXPORT(void)
-PyInit_termios()
+PyInit_termios(void)
{
PyObject *m, *d;
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index 1a1f66732d..ef73c26fc6 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -34,7 +34,7 @@ typedef struct {
staticforward PyTypeObject Locktype;
static lockobject *
-newlockobject()
+newlockobject(void)
{
lockobject *self;
self = PyObject_New(lockobject, &Locktype);
@@ -377,7 +377,7 @@ unlock it. A thread attempting to lock a lock that it has already locked\n\
will block until another thread unlocks it. Deadlocks may ensue.";
DL_EXPORT(void)
-initthread()
+initthread(void)
{
PyObject *m, *d;
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 9b2fd99004..b9aba51835 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -107,7 +107,7 @@ static PyObject *moddict;
static long timezone;
static void
-initmactimezone()
+initmactimezone(void)
{
MachineLocation loc;
long delta;
@@ -579,7 +579,7 @@ strptime() -- parse string to time tuple according to format specification\n\
DL_EXPORT(void)
-inittime()
+inittime(void)
{
PyObject *m, *d;
char *p;
@@ -667,7 +667,7 @@ inittime()
/* Implement floattime() for various platforms */
static double
-floattime()
+floattime(void)
{
/* There are three ways to get the time:
(1) gettimeofday() -- resolution in microseconds
diff --git a/Modules/timingmodule.c b/Modules/timingmodule.c
index f7323bb565..07420053d6 100644
--- a/Modules/timingmodule.c
+++ b/Modules/timingmodule.c
@@ -69,7 +69,7 @@ static PyMethodDef timing_methods[] = {
};
-DL_EXPORT(void) inittiming()
+DL_EXPORT(void) inittiming(void)
{
(void)Py_InitModule("timing", timing_methods);
if (PyErr_Occurred())
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 8fd5fd9365..890fb97b64 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -273,7 +273,7 @@ static PyMethodDef unicodedata_functions[] = {
};
DL_EXPORT(void)
-initunicodedata()
+initunicodedata(void)
{
Py_InitModule("unicodedata", unicodedata_functions);
}
diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c
index 04779195b3..ede1979ffc 100644
--- a/Modules/xxmodule.c
+++ b/Modules/xxmodule.c
@@ -202,7 +202,7 @@ static PyMethodDef xx_methods[] = {
/* Initialization function for the module (*must* be called initxx) */
DL_EXPORT(void)
-initxx()
+initxx(void)
{
PyObject *m, *d;
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 492adf2659..ff3470686a 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -829,7 +829,7 @@ static char zlib_module_documentation[]=
;
DL_EXPORT(void)
-PyInit_zlib()
+PyInit_zlib(void)
{
PyObject *m, *d, *ver;
Comptype.ob_type = &PyType_Type;