Merge pull request from matthew-brett/find-builtin-tkinter

FIX: search for tkinter first in builtins
This commit is contained in:
wiredfool 2016-11-11 16:54:28 +00:00 committed by GitHub
commit f428daba20

View File

@ -438,10 +438,19 @@ int load_tkinter_funcs(void)
*/
int ret = -1;
void *tkinter_lib;
void *main_program, *tkinter_lib;
char *tkinter_libname;
PyObject *pModule = NULL, *pString = NULL;
/* Try loading from the main program namespace first */
main_program = dlopen(NULL, RTLD_LAZY);
if (_func_loader(main_program) == 0) {
return 0;
}
/* Clear exception triggered when we didn't find symbols above */
PyErr_Clear();
/* Now try finding the tkinter compiled module */
pModule = PyImport_ImportModule(TKINTER_FINDER);
if (pModule == NULL) {
goto exit;