From 96a8fb7e99aa8d612473a1dd87e4c1deb8408898 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 22 Dec 1999 14:09:35 +0000 Subject: Cleanup patches from Greg Stein: * in import.c, #ifdef out references to dynamic loading based on HAVE_DYNAMIC_LOADING * clean out the platform-specific crud from importdl.c. [ maybe fold this function into import.c and drop the importdl.c file? Greg.] * change GetDynLoadFunc's "funcname" parameter to "shortname". change "name" to "fqname" for clarification. * each GetDynLoadFunc now creates its own funcname value. WARNING: as I mentioned previously, we may run into an issue with a missing "_" on some platforms. Testing will show this pretty quickly, however. * move pathname munging into dynload_shlib.c --- Python/dynload_os2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Python/dynload_os2.c') diff --git a/Python/dynload_os2.c b/Python/dynload_os2.c index 6090c3300b..528e7dc600 100644 --- a/Python/dynload_os2.c +++ b/Python/dynload_os2.c @@ -45,13 +45,14 @@ const struct filedescr _PyImport_DynLoadFiletab[] = { {0, 0} }; -dl_funcptr _PyImport_GetDynLoadFunc(const char *name, const char *funcname, +dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, const char *pathname, FILE *fp) { dl_funcptr p; APIRET rc; HMODULE hDLL; char failreason[256]; + char funcname[258]; rc = DosLoadModule(failreason, sizeof(failreason), @@ -67,6 +68,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *name, const char *funcname, return NULL; } + sprintf(funcname, "init%.200s", shortname); rc = DosQueryProcAddr(hDLL, 0L, funcname, &p); if (rc != NO_ERROR) p = NULL; /* Signify Failure to Acquire Entrypoint */ -- cgit v1.2.1