Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
CristiFati committed Feb 24, 2024
1 parent c3d970b commit 7dbea7e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions win32/src/win32gui.i
Original file line number Diff line number Diff line change
Expand Up @@ -2053,11 +2053,11 @@ BOOL CALLBACK PyEnumWindowsProc(
PyObject *args = Py_BuildValue("(NO)", PyWinLong_FromHANDLE(hwnd), cb->extra);
if (args == NULL)
return FALSE;
PyObject *ret = PyEval_CallObject(cb->func, args);
PyObject *ret = PyObject_CallObject(cb->func, args);
Py_DECREF(args);
if (ret == NULL)
if (ret == NULL)
return FALSE;
if (ret != Py_None){
if (ret != Py_None) {
result = PyLong_AsLong(ret);
if (result == -1 && PyErr_Occurred())
result = FALSE;
Expand Down Expand Up @@ -2091,8 +2091,7 @@ static PyObject *PyEnumWindows(PyObject *self, PyObject *args)
return NULL;
return PyWin_SetAPIError("EnumWindows", 0, true);
}
Py_INCREF(Py_None);
return Py_None;
Py_RETURN_NONE;
}

#ifndef MS_WINCE
Expand Down

0 comments on commit 7dbea7e

Please sign in to comment.