mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Avoid using PyErr_SetFromWindowsErr on Cygwin
This commit is contained in:
parent
80d7fa9004
commit
4a36d9d761
|
@ -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))) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user