1 new commit in py:
https://bitbucket.org/hpk42/py/changeset/b418f117d16a/ changeset: b418f117d16a user: RonnyPfannschmidt date: 2012-02-17 12:01:07 summary: terminalwriter: apply mattip's ctypes argtype declarations for winapi from pypy e16f0468532b affected #: 1 file diff -r 6973aa47321b31e691c3b8a4e13d34ceaea30f8f -r b418f117d16a960b5c276f06b51b4fe2d4ff3e80 py/_io/terminalwriter.py --- a/py/_io/terminalwriter.py +++ b/py/_io/terminalwriter.py @@ -294,16 +294,24 @@ ('srWindow', SMALL_RECT), ('dwMaximumWindowSize', COORD)] + _GetStdHandle = ctypes.windll.kernel32.GetStdHandle + _GetStdHandle.argtypes = [wintypes.DWORD] + _GetStdHandle.restype = wintypes.HANDLE def GetStdHandle(kind): - return ctypes.windll.kernel32.GetStdHandle(kind) + return _GetStdHandle(kind) - SetConsoleTextAttribute = \ - ctypes.windll.kernel32.SetConsoleTextAttribute + SetConsoleTextAttribute = ctypes.windll.kernel32.SetConsoleTextAttribute + SetConsoleTextAttribute.argtypes = [wintypes.HANDLE, wintypes.WORD] + SetConsoleTextAttribute.restype = wintypes.BOOL + _GetConsoleScreenBufferInfo = \ + ctypes.windll.kernel32.GetConsoleScreenBufferInfo + _GetConsoleScreenBufferInfo.argtypes = [wintypes.HANDLE, + ctypes.POINTER(CONSOLE_SCREEN_BUFFER_INFO)] + _GetConsoleScreenBufferInfo.restype = wintypes.BOOL def GetConsoleInfo(handle): info = CONSOLE_SCREEN_BUFFER_INFO() - ctypes.windll.kernel32.GetConsoleScreenBufferInfo(\ - handle, ctypes.byref(info)) + _GetConsoleScreenBufferInfo(handle, ctypes.byref(info)) return info def _getdimensions(): Repository URL: https://bitbucket.org/hpk42/py/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn