mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
This commit is contained in:
parent
50f385c197
commit
3886bb6997
@ -1522,7 +1522,7 @@ static PyMethodDef PyCurses_methods[] = {
|
|||||||
|
|
||||||
/* Initialization function for the module */
|
/* Initialization function for the module */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initcurses()
|
initcurses()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *v;
|
PyObject *m, *d, *v;
|
||||||
|
@ -309,7 +309,7 @@ static struct PyMethodDef PyLocale_Methods[] = {
|
|||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
init_locale()
|
init_locale()
|
||||||
{
|
{
|
||||||
PyObject *m,*d,*x;
|
PyObject *m,*d,*x;
|
||||||
|
@ -2006,7 +2006,7 @@ ins_string(d, name, val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
init_tkinter()
|
init_tkinter()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -1457,7 +1457,7 @@ statichere PyTypeObject Arraytype = {
|
|||||||
arraytype_doc, /*tp_doc*/
|
arraytype_doc, /*tp_doc*/
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initarray()
|
initarray()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -1402,7 +1402,7 @@ static PyMethodDef audioop_methods[] = {
|
|||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initaudioop()
|
initaudioop()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -742,7 +742,7 @@ static struct PyMethodDef binascii_module_methods[] = {
|
|||||||
/* Initialization function for the module (*must* be called initbinascii) */
|
/* Initialization function for the module (*must* be called initbinascii) */
|
||||||
static char doc_binascii[] = "Conversion between binary data and ASCII";
|
static char doc_binascii[] = "Conversion between binary data and ASCII";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initbinascii()
|
initbinascii()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *x;
|
PyObject *m, *d, *x;
|
||||||
|
@ -865,7 +865,7 @@ static PyMethodDef bsddbmodule_methods[] = {
|
|||||||
{0, 0},
|
{0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initbsddb() {
|
initbsddb() {
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ static struct PycStringIO_CAPI CAPI = {
|
|||||||
&Otype,
|
&Otype,
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initcStringIO() {
|
initcStringIO() {
|
||||||
PyObject *m, *d, *v;
|
PyObject *m, *d, *v;
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ static PyMethodDef cmath_methods[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initcmath()
|
initcmath()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *v;
|
PyObject *m, *d, *v;
|
||||||
|
@ -27,7 +27,7 @@ static PyMethodDef crypt_methods[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initcrypt()
|
initcrypt()
|
||||||
{
|
{
|
||||||
Py_InitModule("crypt", crypt_methods);
|
Py_InitModule("crypt", crypt_methods);
|
||||||
|
@ -311,7 +311,7 @@ static PyMethodDef dbmmodule_methods[] = {
|
|||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initdbm() {
|
initdbm() {
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
|
@ -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\
|
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'.";
|
e.g. os.strerror(2) could return 'No such file or directory'.";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initerrno()
|
initerrno()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *de;
|
PyObject *m, *d, *de;
|
||||||
|
@ -320,7 +320,7 @@ all_ins(d)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initfcntl()
|
initfcntl()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -2520,7 +2520,7 @@ static PyMethodDef forms_methods[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initfl()
|
initfl()
|
||||||
{
|
{
|
||||||
Py_InitModule("fl", forms_methods);
|
Py_InitModule("fl", forms_methods);
|
||||||
|
@ -227,7 +227,7 @@ static void sigfpe_handler(int signo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void initfpectl(void)
|
DL_EXPORT(void) initfpectl(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
m = Py_InitModule("fpectl", fpectl_methods);
|
m = Py_InitModule("fpectl", fpectl_methods);
|
||||||
|
@ -172,7 +172,7 @@ static double overflow(double b)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
void initfpetest(void)
|
DL_EXPORT(void) initfpetest(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ static PyMethodDef dbmmodule_methods[] = {
|
|||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initgdbm() {
|
initgdbm() {
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ static PyMethodDef grp_methods[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initgrp()
|
initgrp()
|
||||||
{
|
{
|
||||||
Py_InitModule("grp", grp_methods);
|
Py_InitModule("grp", grp_methods);
|
||||||
|
@ -758,7 +758,7 @@ static PyMethodDef imageop_methods[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initimageop()
|
initimageop()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -234,6 +234,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
|||||||
*) sed -e "
|
*) sed -e "
|
||||||
1i$NL/* Generated automatically from $config by makesetup. */
|
1i$NL/* Generated automatically from $config by makesetup. */
|
||||||
/MARKER 1/i$NL$EXTDECLS
|
/MARKER 1/i$NL$EXTDECLS
|
||||||
|
|
||||||
/MARKER 2/i$NL$INITBITS
|
/MARKER 2/i$NL$INITBITS
|
||||||
|
|
||||||
" $config >config.c
|
" $config >config.c
|
||||||
|
@ -233,7 +233,7 @@ static PyMethodDef math_methods[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initmath()
|
initmath()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *v;
|
PyObject *m, *d, *v;
|
||||||
|
@ -267,7 +267,7 @@ static PyMethodDef md5_functions[] = {
|
|||||||
|
|
||||||
/* Initialize this module. */
|
/* Initialize this module. */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initmd5()
|
initmd5()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -1819,7 +1819,7 @@ void mp_free( ptr, size )
|
|||||||
|
|
||||||
/* Initialize this module. */
|
/* Initialize this module. */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initmpz()
|
initmpz()
|
||||||
{
|
{
|
||||||
PyObject *module;
|
PyObject *module;
|
||||||
|
@ -226,7 +226,7 @@ char new_doc[] =
|
|||||||
\n\
|
\n\
|
||||||
You need to know a great deal about the interpreter to use this!";
|
You need to know a great deal about the interpreter to use this!";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initnew()
|
initnew()
|
||||||
{
|
{
|
||||||
Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL,
|
Py_InitModule4("new", new_methods, new_doc, (PyObject *)NULL,
|
||||||
|
@ -255,7 +255,7 @@ spam2(delslice,__delslice__,
|
|||||||
|
|
||||||
/* Initialization function for the module (*must* be called initoperator) */
|
/* Initialization function for the module (*must* be called initoperator) */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initoperator()
|
initoperator()
|
||||||
{
|
{
|
||||||
/* Create the module and add the functions */
|
/* Create the module and add the functions */
|
||||||
|
@ -2746,7 +2746,7 @@ static PyMethodDef parser_functions[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initparser()
|
initparser()
|
||||||
{
|
{
|
||||||
PyObject* module;
|
PyObject* module;
|
||||||
|
@ -636,7 +636,7 @@ insint(d, name, value)
|
|||||||
|
|
||||||
/* Initialization function for the module (*must* be called initpcre) */
|
/* Initialization function for the module (*must* be called initpcre) */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initpcre()
|
initpcre()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -2899,7 +2899,7 @@ all_ins(d)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
INITFUNC()
|
INITFUNC()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *v;
|
PyObject *m, *d, *v;
|
||||||
|
@ -164,7 +164,7 @@ static PyMethodDef pwd_methods[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initpwd()
|
initpwd()
|
||||||
{
|
{
|
||||||
Py_InitModule4("pwd", pwd_methods, pwd__doc__,
|
Py_InitModule4("pwd", pwd_methods, pwd__doc__,
|
||||||
|
@ -304,7 +304,7 @@ call_readline(prompt)
|
|||||||
static char doc_module[] =
|
static char doc_module[] =
|
||||||
"Importing this module enables command line editing using GNU readline.";
|
"Importing this module enables command line editing using GNU readline.";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initreadline()
|
initreadline()
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m;
|
||||||
|
@ -707,7 +707,7 @@ static struct PyMethodDef regex_global_methods[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initregex()
|
initregex()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *v;
|
PyObject *m, *d, *v;
|
||||||
|
@ -788,7 +788,7 @@ rgbimg_methods[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initrgbimg()
|
initrgbimg()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -655,7 +655,7 @@ rotor_methods[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initrotor()
|
initrotor()
|
||||||
{
|
{
|
||||||
(void)Py_InitModule("rotor", rotor_methods);
|
(void)Py_InitModule("rotor", rotor_methods);
|
||||||
|
@ -378,7 +378,7 @@ static char module_doc[] =
|
|||||||
*** IMPORTANT NOTICE ***\n\
|
*** IMPORTANT NOTICE ***\n\
|
||||||
On Windows, only sockets are supported; on Unix, all file descriptors.";
|
On Windows, only sockets are supported; on Unix, all file descriptors.";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initselect()
|
initselect()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -339,7 +339,7 @@ SIGINT, SIGTERM, etc. -- signal numbers\n\
|
|||||||
A signal handler function is called with two arguments:\n\
|
A signal handler function is called with two arguments:\n\
|
||||||
the first is the signal number, the second is the interrupted stack frame.";
|
the first is the signal number, the second is the interrupted stack frame.";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initsignal()
|
initsignal()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *x;
|
PyObject *m, *d, *x;
|
||||||
|
@ -1887,7 +1887,7 @@ shutdown() -- shut down traffic in one or both directions\n\
|
|||||||
\n\
|
\n\
|
||||||
(*) not available on all platforms!)";
|
(*) not available on all platforms!)";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
#if defined(MS_WINDOWS) || defined(PYOS_OS2) || defined(__BEOS__)
|
#if defined(MS_WINDOWS) || defined(PYOS_OS2) || defined(__BEOS__)
|
||||||
init_socket()
|
init_socket()
|
||||||
#else
|
#else
|
||||||
|
@ -166,7 +166,7 @@ static PyMethodDef SoundexMethods[] =
|
|||||||
|
|
||||||
/* Register the method table.
|
/* Register the method table.
|
||||||
*/
|
*/
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initsoundex()
|
initsoundex()
|
||||||
{
|
{
|
||||||
(void) Py_InitModule4("soundex",
|
(void) Py_InitModule4("soundex",
|
||||||
|
@ -2611,7 +2611,7 @@ putbackstringlist(list, s, n)
|
|||||||
}
|
}
|
||||||
#endif /* macintosh */
|
#endif /* macintosh */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initstdwin()
|
initstdwin()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -1189,7 +1189,7 @@ strop_methods[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initstrop()
|
initstrop()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *s;
|
PyObject *m, *d, *s;
|
||||||
|
@ -1358,7 +1358,7 @@ static PyMethodDef struct_methods[] = {
|
|||||||
|
|
||||||
/* Module initialization */
|
/* Module initialization */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initstruct()
|
initstruct()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -182,7 +182,7 @@ ins(d, s, x)
|
|||||||
|
|
||||||
/* Initialization function for the module */
|
/* Initialization function for the module */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initsyslog()
|
initsyslog()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -299,7 +299,7 @@ static PyMethodDef termios_methods[] =
|
|||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
PyInit_termios()
|
PyInit_termios()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -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\
|
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.";
|
will block until another thread unlocks it. Deadlocks may ensue.";
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initthread()
|
initthread()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -596,7 +596,7 @@ strptime() -- parse string to time tuple according to format specification\n\
|
|||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
inittime()
|
inittime()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -79,7 +79,7 @@ static PyMethodDef timing_methods[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void inittiming()
|
DL_EXPORT(void) inittiming()
|
||||||
{
|
{
|
||||||
(void)Py_InitModule("timing", timing_methods);
|
(void)Py_InitModule("timing", timing_methods);
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
|
@ -237,7 +237,7 @@ static PyMethodDef xx_methods[] = {
|
|||||||
|
|
||||||
/* Initialization function for the module (*must* be called initxx) */
|
/* Initialization function for the module (*must* be called initxx) */
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
initxx()
|
initxx()
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
@ -788,7 +788,7 @@ static char zlib_module_documentation[]=
|
|||||||
"objects support decompress() and flush()."
|
"objects support decompress() and flush()."
|
||||||
;
|
;
|
||||||
|
|
||||||
void
|
DL_EXPORT(void)
|
||||||
PyInit_zlib()
|
PyInit_zlib()
|
||||||
{
|
{
|
||||||
PyObject *m, *d, *ver;
|
PyObject *m, *d, *ver;
|
||||||
|
Loading…
Reference in New Issue
Block a user