Use Py_ssize_t instead of long

This commit is contained in:
Christoph Gohlke 2013-02-13 18:52:41 -08:00
parent 007a4405de
commit 8b70b2fb79

View File

@ -399,7 +399,7 @@ static BOOL CALLBACK list_windows_callback(HWND hwnd, LPARAM lParam)
GetWindowRect(hwnd, &outer);
item = Py_BuildValue(
"lN(iiii)(iiii)", (long) hwnd, title,
"nN(iiii)(iiii)", (Py_ssize_t) hwnd, title,
inner.left, inner.top, inner.right, inner.bottom,
outer.left, outer.top, outer.right, outer.bottom
);
@ -743,7 +743,7 @@ PyImaging_CreateWindowWin32(PyObject* self, PyObject* args)
SetForegroundWindow(wnd); /* to make sure it's visible */
Py_END_ALLOW_THREADS
return Py_BuildValue("l", (long) wnd);
return Py_BuildValue("n", (Py_ssize_t) wnd);
}
PyObject*