Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8924913

Browse files
authored
BUG: Fix the returned value for PyErr_SetFromWindowsErr
I didn't notice that PyErr_SetString returned void. This should return something normal.
1 parent 2bea21b commit 8924913

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/_tkagg.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
*/
2626
#define WIN32_DLL
2727
static inline PyObject *PyErr_SetFromWindowsErr(int ierr) {
28-
return PyErr_SetString(PyExc_OSError, "Call to EnumProcessModules failed");
28+
PyErr_SetString(PyExc_OSError, "Call to EnumProcessModules failed");
29+
return NULL;
2930
}
3031
#endif
3132

0 commit comments

Comments
 (0)