mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 09:23:11 +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 */
|
/* Allocate module handlers array */
|
||||||
if (!EnumProcessModules(hProcess, NULL, 0, &cbNeeded)) {
|
if (!EnumProcessModules(hProcess, NULL, 0, &cbNeeded)) {
|
||||||
|
#if defined(__CYGWIN__)
|
||||||
|
PyErr_SetString(PyExc_OSError, "Call to EnumProcessModules failed");
|
||||||
|
#else
|
||||||
PyErr_SetFromWindowsErr(0);
|
PyErr_SetFromWindowsErr(0);
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (!(hMods = (HMODULE*) malloc(cbNeeded))) {
|
if (!(hMods = (HMODULE*) malloc(cbNeeded))) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user