Skip to content

Commit

Permalink
Avoid using PyErr_SetFromWindowsErr on Cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
javidcf committed Nov 25, 2022
1 parent 80d7fa9 commit 4a36d9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Tk/tkImaging.c
Expand Up @@ -329,7 +329,11 @@ load_tkinter_funcs(void) {

/* Allocate module handlers array */
if (!EnumProcessModules(hProcess, NULL, 0, &cbNeeded)) {
#if defined(__CYGWIN__)
PyErr_SetString(PyExc_OSError, "Call to EnumProcessModules failed");
#else
PyErr_SetFromWindowsErr(0);
#endif
return 1;
}
if (!(hMods = (HMODULE*) malloc(cbNeeded))) {
Expand Down

0 comments on commit 4a36d9d

Please sign in to comment.