X Tutup
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/_tkagg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,19 @@ int load_tkinter_funcs(void)
// Load tkinter global funcs from tkinter compiled module.
// Return 0 for success, non-zero for failure.
int ret = -1;
void *tkinter_lib;
void *main_program, *tkinter_lib;
char *tkinter_libname;
PyObject *pModule = NULL, *pSubmodule = 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_PKG);
if (pModule == NULL) {
goto exit;
Expand Down
X Tutup