[pywin32-checkins] pywin32/win32/src win32gui.i,1.115,1.116
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-02-12 17:39:40
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28439 Modified Files: win32gui.i Log Message: Fix some 64-bit issues with WPARAM, LPARAM, and LRESULT Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** win32gui.i 6 Feb 2008 18:42:51 -0000 1.115 --- win32gui.i 12 Feb 2008 17:39:43 -0000 1.116 *************** *** 327,333 **** typedef long COLORREF ! typedef long WPARAM; ! typedef long LPARAM; ! typedef long LRESULT; typedef int UINT; --- 327,333 ---- typedef long COLORREF ! typedef HANDLE WPARAM; ! typedef HANDLE LPARAM; ! typedef HANDLE LRESULT; typedef int UINT; *************** *** 666,670 **** // We are dispatching to Python... ! PyObject *args = Py_BuildValue("Nlll", PyWinLong_FromHANDLE(hWnd), uMsg, wParam, lParam); if (args==NULL){ HandleError("Error building argument tuple for python callback"); --- 666,671 ---- // We are dispatching to Python... ! PyObject *args = Py_BuildValue("NlNN", PyWinLong_FromHANDLE(hWnd), uMsg, ! PyWinObject_FromPARAM(wParam), PyWinObject_FromPARAM(lParam)); if (args==NULL){ HandleError("Error building argument tuple for python callback"); *************** *** 674,682 **** Py_DECREF(args); LRESULT rc = 0; ! if (ret) { ! if (ret != Py_None) // can remain zero for that! ! rc = PyInt_AsLong(ret); Py_DECREF(ret); ! } else HandleError("Python WNDPROC handler failed"); --- 675,683 ---- Py_DECREF(args); LRESULT rc = 0; ! if (ret){ ! if (!PyWinObject_AsPARAM(ret, (LPARAM *)&rc)) ! HandleError("WNDPROC return value cannot be converted to LRESULT"); Py_DECREF(ret); ! } else HandleError("Python WNDPROC handler failed"); *************** *** 1903,1907 **** // @pyswig int|RegisterWindowMessage|Defines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or posting messages. // @pyparm string/unicode|name||The string ! LRESULT RegisterWindowMessage(TCHAR *lpString); // @pyswig int|DefWindowProc| --- 1904,1908 ---- // @pyswig int|RegisterWindowMessage|Defines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or posting messages. // @pyparm string/unicode|name||The string ! UINT RegisterWindowMessage(TCHAR *lpString); // @pyswig int|DefWindowProc| *************** *** 3553,3557 **** // @pyparm <o PyRECT>|prcRect||Pointer to rec (can be None) ! LRESULT TrackPopupMenu(HMENU hmenu, UINT flags, int x, int y, int reserved, HWND hwnd, const RECT *INPUT_NULLOK); #define TPM_CENTERALIGN TPM_CENTERALIGN --- 3554,3558 ---- // @pyparm <o PyRECT>|prcRect||Pointer to rec (can be None) ! BOOL TrackPopupMenu(HMENU hmenu, UINT flags, int x, int y, int reserved, HWND hwnd, const RECT *INPUT_NULLOK); #define TPM_CENTERALIGN TPM_CENTERALIGN |