From 4720b156d9ea2dd504ebbabe962ef776ba84d58b 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_dl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Python/dynload_dl.c') diff --git a/Python/dynload_dl.c b/Python/dynload_dl.c index 3b445ceb4f..45dcff740a 100644 --- a/Python/dynload_dl.c +++ b/Python/dynload_dl.c @@ -46,8 +46,11 @@ const struct filedescr _PyImport_DynLoadFiletab[] = { }; -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) { + char funcname[258]; + + sprintf(funcname, "init%.200s", shortname); return dl_loadmod(Py_GetProgramName(), pathname, funcname); } -- cgit v1.2.1