diff options
author | Guido van Rossum <guido@python.org> | 1998-12-04 18:50:17 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-04 18:50:17 +0000 |
commit | 3886bb6997f8f7b0b64eed19045161e697f415fe (patch) | |
tree | 6730ba3a04a7579abebbbe8190cb167fcb3f7e62 | |
parent | Fix two small bugs; add DL_EXPORT() to initcPickle decl. (diff) | |
download | cpython-3886bb6997f8f7b0b64eed19045161e697f415fe.tar.gz cpython-3886bb6997f8f7b0b64eed19045161e697f415fe.tar.bz2 cpython-3886bb6997f8f7b0b64eed19045161e697f415fe.zip |
Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
47 files changed, 47 insertions, 46 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index b42a2bc1fbf..b68fd7d4c64 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1522,7 +1522,7 @@ static PyMethodDef PyCurses_methods[] = { /* Initialization function for the module */ -void +DL_EXPORT(void) initcurses() { PyObject *m, *d, *v; diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 2f7a42b7b37..3b8472954bb 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -309,7 +309,7 @@ static struct PyMethodDef PyLocale_Methods[] = { {NULL, NULL} }; -void +DL_EXPORT(void) init_locale() { PyObject *m,*d,*x; diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 86a4e589cb3..9d68c69f037 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2006,7 +2006,7 @@ ins_string(d, name, val) } -void +DL_EXPORT(void) init_tkinter() { PyObject *m, *d; diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index fc31b31e8c9..656f5a68af1 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1457,7 +1457,7 @@ statichere PyTypeObject Arraytype = { arraytype_doc, /*tp_doc*/ }; -void +DL_EXPORT(void) initarray() { PyObject *m, *d; diff --git a/Modules/audioop.c b/Modules/audioop.c index e7edfec84e1..76fba98066b 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -1402,7 +1402,7 @@ static PyMethodDef audioop_methods[] = { { 0, 0 } }; -void +DL_EXPORT(void) initaudioop() { PyObject *m, *d; diff --git a/Modules/binascii.c b/Modules/binascii.c index 26e4b6c7551..73dc27a8944 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -742,7 +742,7 @@ static struct PyMethodDef binascii_module_methods[] = { /* Initialization function for the module (*must* be called initbinascii) */ static char doc_binascii[] = "Conversion between binary data and ASCII"; -void +DL_EXPORT(void) initbinascii() { PyObject *m, *d, *x; diff --git a/Modules/bsddbmodule.c b/Modules/bsddbmodule.c index ca7fa5f0d6c..1bb40e6fd7e 100644 --- a/Modules/bsddbmodule.c +++ b/Modules/bsddbmodule.c @@ -865,7 +865,7 @@ static PyMethodDef bsddbmodule_methods[] = { {0, 0}, }; -void +DL_EXPORT(void) initbsddb() { PyObject *m, *d; diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index 6828a11ac7b..19a04503f1f 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -589,7 +589,7 @@ static struct PycStringIO_CAPI CAPI = { &Otype, }; -void +DL_EXPORT(void) initcStringIO() { PyObject *m, *d, *v; diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c index 4e08722bcca..583a629a2c2 100644 --- a/Modules/cmathmodule.c +++ b/Modules/cmathmodule.c @@ -301,7 +301,7 @@ static PyMethodDef cmath_methods[] = { {NULL, NULL} /* sentinel */ }; -void +DL_EXPORT(void) initcmath() { PyObject *m, *d, *v; diff --git a/Modules/cryptmodule.c b/Modules/cryptmodule.c index 1498bb07457..7cc03bed28f 100644 --- a/Modules/cryptmodule.c +++ b/Modules/cryptmodule.c @@ -27,7 +27,7 @@ static PyMethodDef crypt_methods[] = { {NULL, NULL} /* sentinel */ }; -void +DL_EXPORT(void) initcrypt() { Py_InitModule("crypt", crypt_methods); diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c index ea628f196eb..7a234a2cd41 100644 --- a/Modules/dbmmodule.c +++ b/Modules/dbmmodule.c @@ -311,7 +311,7 @@ static PyMethodDef dbmmodule_methods[] = { { 0, 0 }, }; -void +DL_EXPORT(void) initdbm() { PyObject *m, *d; diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c index 8120075ba3e..f18a6555ba0 100644 --- a/Modules/errnomodule.c +++ b/Modules/errnomodule.c @@ -94,7 +94,7 @@ Symbols that are not relevant to the underlying system are not defined.\n\ 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'."; -void +DL_EXPORT(void) initerrno() { PyObject *m, *d, *de; diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index 6e7c1c2d9c1..59a4d4ae55e 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -320,7 +320,7 @@ all_ins(d) return 0; } -void +DL_EXPORT(void) initfcntl() { PyObject *m, *d; diff --git a/Modules/flmodule.c b/Modules/flmodule.c index 2e2dd5efd43..c921d4bca37 100644 --- a/Modules/flmodule.c +++ b/Modules/flmodule.c @@ -2520,7 +2520,7 @@ static PyMethodDef forms_methods[] = { {NULL, NULL} /* sentinel */ }; -void +DL_EXPORT(void) initfl() { Py_InitModule("fl", forms_methods); diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c index e2a80227235..ca3a2c989a4 100644 --- a/Modules/fpectlmodule.c +++ b/Modules/fpectlmodule.c @@ -227,7 +227,7 @@ static void sigfpe_handler(int signo) } } -void initfpectl(void) +DL_EXPORT(void) initfpectl(void) { PyObject *m, *d; m = Py_InitModule("fpectl", fpectl_methods); diff --git a/Modules/fpetestmodule.c b/Modules/fpetestmodule.c index 61dd3db734d..c1e87cec5c1 100644 --- a/Modules/fpetestmodule.c +++ b/Modules/fpetestmodule.c @@ -172,7 +172,7 @@ static double overflow(double b) return a; } -void initfpetest(void) +DL_EXPORT(void) initfpetest(void) { PyObject *m, *d; diff --git a/Modules/gdbmmodule.c b/Modules/gdbmmodule.c index ae716ac4949..0df7df24cf0 100644 --- a/Modules/gdbmmodule.c +++ b/Modules/gdbmmodule.c @@ -514,7 +514,7 @@ static PyMethodDef dbmmodule_methods[] = { { 0, 0 }, }; -void +DL_EXPORT(void) initgdbm() { PyObject *m, *d; diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c index 0199b6b033a..c5a4043695e 100644 --- a/Modules/grpmodule.c +++ b/Modules/grpmodule.c @@ -125,7 +125,7 @@ static PyMethodDef grp_methods[] = { {NULL, NULL} /* sentinel */ }; -void +DL_EXPORT(void) initgrp() { Py_InitModule("grp", grp_methods); diff --git a/Modules/imageop.c b/Modules/imageop.c index 7b82e040c81..5572c9fd79c 100644 --- a/Modules/imageop.c +++ b/Modules/imageop.c @@ -758,7 +758,7 @@ static PyMethodDef imageop_methods[] = { }; -void +DL_EXPORT(void) initimageop() { PyObject *m, *d; diff --git a/Modules/makesetup b/Modules/makesetup index b29938cb31f..8ce1e88b2b6 100755 --- a/Modules/makesetup +++ b/Modules/makesetup @@ -234,6 +234,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | *) sed -e " 1i$NL/* Generated automatically from $config by makesetup. */ /MARKER 1/i$NL$EXTDECLS + /MARKER 2/i$NL$INITBITS " $config >config.c diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 174a231b8e6..7c11e6feb69 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -233,7 +233,7 @@ static PyMethodDef math_methods[] = { {NULL, NULL} /* sentinel */ }; -void +DL_EXPORT(void) initmath() { PyObject *m, *d, *v; diff --git a/Modules/md5module.c b/Modules/md5module.c index e82d3394643..2508f52dff7 100644 --- a/Modules/md5module.c +++ b/Modules/md5module.c @@ -267,7 +267,7 @@ static PyMethodDef md5_functions[] = { /* Initialize this module. */ -void +DL_EXPORT(void) initmd5() { PyObject *m, *d; diff --git a/Modules/mpzmodule.c b/Modules/mpzmodule.c index 4299f454b71..e1fd7bfa4b1 100644 --- a/Modules/mpzmodule.c +++ b/Modules/mpzmodule.c @@ -1819,7 +1819,7 @@ void mp_free( ptr, size ) /* Initialize this module. */ -void +DL_EXPORT(void) initmpz() { PyObject *module; diff --git a/Modules/newmodule.c b/Modules/newmodule.c index 5c92e0eda4f..786ddc5f599 100644 --- a/Modules/newmodule.c +++ b/Modules/newmodule.c @@ -226,7 +226,7 @@ char new_doc[] = \n\ You need to know a great deal about the interpreter to use this!"; -void +DL_EXPORT(void) initnew() { Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL, diff --git a/Modules/operator.c b/Modules/operator.c index 8b3c56be900..d790d7cc907 100644 --- a/Modules/operator.c +++ b/Modules/operator.c @@ -255,7 +255,7 @@ spam2(delslice,__delslice__, /* Initialization function for the module (*must* be called initoperator) */ -void +DL_EXPORT(void) initoperator() { /* Create the module and add the functions */ diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index cd8381ca50d..d0ba9e99603 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -2746,7 +2746,7 @@ static PyMethodDef parser_functions[] = { }; -void +DL_EXPORT(void) initparser() { PyObject* module; diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c index 9819fdde15f..fa986964887 100644 --- a/Modules/pcremodule.c +++ b/Modules/pcremodule.c @@ -636,7 +636,7 @@ insint(d, name, value) /* Initialization function for the module (*must* be called initpcre) */ -void +DL_EXPORT(void) initpcre() { PyObject *m, *d; diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 876522b93ad..f9f6284bd2b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -2899,7 +2899,7 @@ all_ins(d) #endif #endif -void +DL_EXPORT(void) INITFUNC() { PyObject *m, *d, *v; diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index 732e4dcbf1d..00522b99729 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -164,7 +164,7 @@ static PyMethodDef pwd_methods[] = { {NULL, NULL} /* sentinel */ }; -void +DL_EXPORT(void) initpwd() { Py_InitModule4("pwd", pwd_methods, pwd__doc__, diff --git a/Modules/readline.c b/Modules/readline.c index 915cc4a1671..08569f6caee 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -304,7 +304,7 @@ call_readline(prompt) static char doc_module[] = "Importing this module enables command line editing using GNU readline."; -void +DL_EXPORT(void) initreadline() { PyObject *m; diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index afc772264d5..1f64f61467d 100644 --- a/Modules/regexmodule.c +++ b/Modules/regexmodule.c @@ -707,7 +707,7 @@ static struct PyMethodDef regex_global_methods[] = { {NULL, NULL} /* sentinel */ }; -void +DL_EXPORT(void) initregex() { PyObject *m, *d, *v; diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c index 94b055debda..cc5c6d5da94 100644 --- a/Modules/rgbimgmodule.c +++ b/Modules/rgbimgmodule.c @@ -788,7 +788,7 @@ rgbimg_methods[] = { }; -void +DL_EXPORT(void) initrgbimg() { PyObject *m, *d; diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c index 5c7d5824ceb..b3511d8e9ce 100644 --- a/Modules/rotormodule.c +++ b/Modules/rotormodule.c @@ -655,7 +655,7 @@ rotor_methods[] = { }; -void +DL_EXPORT(void) initrotor() { (void)Py_InitModule("rotor", rotor_methods); diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index dfc765c498f..11f72f5aa27 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -378,7 +378,7 @@ static char module_doc[] = *** IMPORTANT NOTICE ***\n\ On Windows, only sockets are supported; on Unix, all file descriptors."; -void +DL_EXPORT(void) initselect() { PyObject *m, *d; diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 8795463cefc..11b624a7044 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -339,7 +339,7 @@ SIGINT, SIGTERM, etc. -- signal numbers\n\ A signal handler function is called with two arguments:\n\ the first is the signal number, the second is the interrupted stack frame."; -void +DL_EXPORT(void) initsignal() { PyObject *m, *d, *x; diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 9d672a64a6c..0564e17f2fc 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1887,7 +1887,7 @@ shutdown() -- shut down traffic in one or both directions\n\ \n\ (*) not available on all platforms!)"; -void +DL_EXPORT(void) #if defined(MS_WINDOWS) || defined(PYOS_OS2) || defined(__BEOS__) init_socket() #else diff --git a/Modules/soundex.c b/Modules/soundex.c index fe00ac6613f..3ef6824892a 100644 --- a/Modules/soundex.c +++ b/Modules/soundex.c @@ -166,7 +166,7 @@ static PyMethodDef SoundexMethods[] = /* Register the method table. */ -void +DL_EXPORT(void) initsoundex() { (void) Py_InitModule4("soundex", diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c index a2720474430..8b18f4920c2 100644 --- a/Modules/stdwinmodule.c +++ b/Modules/stdwinmodule.c @@ -2611,7 +2611,7 @@ putbackstringlist(list, s, n) } #endif /* macintosh */ -void +DL_EXPORT(void) initstdwin() { PyObject *m, *d; diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c index 240a056f6f3..9e9fa044f22 100644 --- a/Modules/stropmodule.c +++ b/Modules/stropmodule.c @@ -1189,7 +1189,7 @@ strop_methods[] = { }; -void +DL_EXPORT(void) initstrop() { PyObject *m, *d, *s; diff --git a/Modules/structmodule.c b/Modules/structmodule.c index a20d5ff542e..9994d203136 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -1358,7 +1358,7 @@ static PyMethodDef struct_methods[] = { /* Module initialization */ -void +DL_EXPORT(void) initstruct() { PyObject *m, *d; diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index f55a77c5bf3..60889b1530c 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -182,7 +182,7 @@ ins(d, s, x) /* Initialization function for the module */ -void +DL_EXPORT(void) initsyslog() { PyObject *m, *d; diff --git a/Modules/termios.c b/Modules/termios.c index e2ef5d0b7ab..f87cea73017 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -299,7 +299,7 @@ static PyMethodDef termios_methods[] = {NULL, NULL} }; -void +DL_EXPORT(void) PyInit_termios() { PyObject *m, *d; diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c index a1ba362ae94..b08ff0bc1c0 100644 --- a/Modules/threadmodule.c +++ b/Modules/threadmodule.c @@ -424,7 +424,7 @@ A lock is not owned by the thread that locked it; another thread may\n\ 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."; -void +DL_EXPORT(void) initthread() { PyObject *m, *d; diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 0a0322d4028..e862ae5a65a 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -596,7 +596,7 @@ strptime() -- parse string to time tuple according to format specification\n\ "; -void +DL_EXPORT(void) inittime() { PyObject *m, *d; diff --git a/Modules/timingmodule.c b/Modules/timingmodule.c index a07ecef98dd..bbccb43bce9 100644 --- a/Modules/timingmodule.c +++ b/Modules/timingmodule.c @@ -79,7 +79,7 @@ static PyMethodDef timing_methods[] = { }; -void inittiming() +DL_EXPORT(void) inittiming() { (void)Py_InitModule("timing", timing_methods); if (PyErr_Occurred()) diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c index 8de3c5d3cf9..529f521aec8 100644 --- a/Modules/xxmodule.c +++ b/Modules/xxmodule.c @@ -237,7 +237,7 @@ static PyMethodDef xx_methods[] = { /* Initialization function for the module (*must* be called initxx) */ -void +DL_EXPORT(void) initxx() { PyObject *m, *d; diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index fc892d064b3..3e4e23dcfe8 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -788,7 +788,7 @@ static char zlib_module_documentation[]= "objects support decompress() and flush()." ; -void +DL_EXPORT(void) PyInit_zlib() { PyObject *m, *d, *ver; |