matplotlib-3.4.3/matplotlib-3.4.3/src/_tkagg.cpp
void load_tkinter_funcs(void)
{
    // Load Tk functions by searching all modules in current process.
    HMODULE hMods[1024];
    HANDLE hProcess;
    DWORD cbNeeded;
    unsigned int i;
    // Returns pseudo-handle that does not need to be closed
    hProcess = GetCurrentProcess();
    // Iterate through modules in this process looking for Tk names.
    if (EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded)) {
        for (i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) {
            if (load_tk(hMods[i])) {
                return;
            }
        }
    }
}
/*
 * On Windows, we can't load the tkinter module to get the Tk symbols, because
 * Windows does not load symbols into the library name-space of importing
 * modules. So, knowing that tkinter has already been imported by Python, we
 * scan all modules in the running process for the Tk function names.
 */
On Windows, we can't load the tkinter module to get the Tk symbols, because
Windows does not load symbols into the library name-space of importing
modules. So, knowing that tkinter has already been imported by Python, we
scan all modules in the running process for the Tk function names.
On Windows we can ' t load the tkinter module to get the Tk symbols because Windows does not load symbols into the library name - space of importing modules . So knowing that tkinter has already been imported by Python we scan all modules in the running process for the Tk function names .
void load_tkinter_funcs(void)
{
    HMODULE hMods[1024];
    HANDLE hProcess;
    DWORD cbNeeded;
    unsigned int i;
    hProcess = GetCurrentProcess();
    if (EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded)) {
        for (i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) {
            if (load_tk(hMods[i])) {
                return;
            }
        }
    }
}
void load_tkinter_funcs ( void ) { HMODULE hMods [ 1024 ] ; HANDLE hProcess ; DWORD cbNeeded ; unsigned int i ; hProcess = GetCurrentProcess ( ) ; if ( EnumProcessModules ( hProcess , hMods , sizeof ( hMods ) , & cbNeeded ) ) { for ( i = 0 ; i < ( cbNeeded / sizeof ( HMODULE ) ) ; i ++ ) { if ( load_tk ( hMods [ i ] ) ) { return ; } } } }
On Windows, we can't load the tkinter module to get the Tk symbols, because
 Windows does not load symbols into the library name-space of importing
 modules.
On Windows we can ' t load the tkinter module to get the Tk symbols because Windows does not load symbols into the library name - space of importing modules .
// Load Tk functions by searching all modules in current process. // Returns pseudo-handle that does not need to be closed // Iterate through modules in this process looking for Tk names.