mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
* stdwinmodule.c (stdwin_done): interface to shutdown stdwin (now this is
no longer done by config.c). * stdwinmodule.c (initstdwin), config.c (initall): get command line arguments from sys.argv instead of special-casing stdwin in config.c * import.c (get_module): fix core dump when foomodule.o does not define initfoo(). * ChangeLog: documented changes by Sjoerd.
This commit is contained in:
parent
842d2ccdcd
commit
cacd9579d4
3 changed files with 98 additions and 24 deletions
|
@ -191,20 +191,22 @@ get_module(m, name, m_ret)
|
|||
p = (dl_funcptr) dlsym(handle, funcname);
|
||||
}
|
||||
#else
|
||||
if (verbose)
|
||||
fprintf(stderr,
|
||||
"import %s # dynamically loaded from \"%s\"\n",
|
||||
name, namebuf);
|
||||
p = dl_loadmod(argv0, namebuf, funcname);
|
||||
#endif /* SUN_SHLIB */
|
||||
if (p == NULL) {
|
||||
D(fprintf(stderr, "dl_loadmod failed\n"));
|
||||
err_setstr(SystemError,
|
||||
"dynamic module does not define init function");
|
||||
return NULL;
|
||||
} else {
|
||||
if (verbose)
|
||||
fprintf(stderr,
|
||||
"import %s # dynamically loaded from \"%s\"\n",
|
||||
name, namebuf);
|
||||
(*p)();
|
||||
*m_ret = m = dictlookup(modules, name);
|
||||
if (m == NULL) {
|
||||
err_setstr(SystemError,
|
||||
"dynamic module missing");
|
||||
"dynamic module not initialized properly");
|
||||
return NULL;
|
||||
} else {
|
||||
D(fprintf(stderr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue