[ctypes-commit] ctypes/ctypes wintypes.py, 1.4, 1.5 util.py, 1.7, 1.8 _endian.py, 1.3, 1.4 __init__
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2006-06-22 19:21:12
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18046 Modified Files: wintypes.py util.py _endian.py __init__.py Log Message: Merge in changes done in Python SVN for 2.5 beta 1: - cleanup whitespace - add Python2.3 compatibility comments - fix the testsuite for openbsd Index: wintypes.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/wintypes.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wintypes.py 14 Jun 2006 09:13:52 -0000 1.4 --- wintypes.py 22 Jun 2006 19:21:10 -0000 1.5 *************** *** 1,3 **** ! # This file contains the most useful windows datatypes. from ctypes import * --- 1,7 ---- ! ###################################################################### ! # This file should be kept compatible with Python 2.3, see PEP 291. # ! ###################################################################### ! ! # The most useful windows datatypes from ctypes import * *************** *** 6,12 **** DWORD = c_ulong BOOLEAN = BYTE BOOL = c_long ! VARIANT_BOOL = c_short ULONG = c_ulong --- 10,26 ---- DWORD = c_ulong + WCHAR = c_wchar + UINT = c_uint + + DOUBLE = c_double + BOOLEAN = BYTE BOOL = c_long ! ! from ctypes import _SimpleCData ! class VARIANT_BOOL(_SimpleCData): ! _type_ = "v" ! def __repr__(self): ! return "%s(%r)" % (self.__class__.__name__, self.value) ULONG = c_ulong *************** *** 14,19 **** # in the windows header files, these are structures. ! LARGE_INTEGER = c_longlong ! ULARGE_INTEGER = c_ulonglong LPCOLESTR = LPOLESTR = OLESTR = c_wchar_p --- 28,33 ---- # in the windows header files, these are structures. ! _LARGE_INTEGER = LARGE_INTEGER = c_longlong ! _ULARGE_INTEGER = ULARGE_INTEGER = c_ulonglong LPCOLESTR = LPOLESTR = OLESTR = c_wchar_p *************** *** 141,142 **** --- 155,172 ---- ("cFileName", c_wchar * MAX_PATH), ("cAlternameFileName", c_wchar * 14)] + + __all__ = ['ATOM', 'BOOL', 'BOOLEAN', 'BYTE', 'COLORREF', 'DOUBLE', + 'DWORD', 'FILETIME', 'HACCEL', 'HANDLE', 'HBITMAP', 'HBRUSH', + 'HCOLORSPACE', 'HDC', 'HDESK', 'HDWP', 'HENHMETAFILE', 'HFONT', + 'HGDIOBJ', 'HGLOBAL', 'HHOOK', 'HICON', 'HINSTANCE', 'HKEY', + 'HKL', 'HLOCAL', 'HMENU', 'HMETAFILE', 'HMODULE', 'HMONITOR', + 'HPALETTE', 'HPEN', 'HRGN', 'HRSRC', 'HSTR', 'HTASK', 'HWINSTA', + 'HWND', 'LANGID', 'LARGE_INTEGER', 'LCID', 'LCTYPE', 'LGRPID', + 'LONG', 'LPARAM', 'LPCOLESTR', 'LPCSTR', 'LPCWSTR', 'LPOLESTR', + 'LPSTR', 'LPWSTR', 'MAX_PATH', 'MSG', 'OLESTR', 'POINT', + 'POINTL', 'RECT', 'RECTL', 'RGB', 'SC_HANDLE', + 'SERVICE_STATUS_HANDLE', 'SIZE', 'SIZEL', 'SMALL_RECT', 'UINT', + 'ULARGE_INTEGER', 'ULONG', 'VARIANT_BOOL', 'WCHAR', + 'WIN32_FIND_DATAA', 'WIN32_FIND_DATAW', 'WORD', 'WPARAM', '_COORD', + '_FILETIME', '_LARGE_INTEGER', '_POINTL', '_RECTL', '_SMALL_RECT', + '_ULARGE_INTEGER', 'tagMSG', 'tagPOINT', 'tagRECT', 'tagSIZE'] Index: util.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/util.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** util.py 20 Apr 2006 18:13:17 -0000 1.7 --- util.py 22 Jun 2006 19:21:10 -0000 1.8 *************** *** 1,4 **** import sys, os - import ctypes # find_library(name) returns the pathname of a library, or None. --- 1,6 ---- + ###################################################################### + # This file should be kept compatible with Python 2.3, see PEP 291. # + ###################################################################### import sys, os # find_library(name) returns the pathname of a library, or None. *************** *** 42,46 **** elif os.name == "posix": # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump ! import re, tempfile def _findLib_gcc(name): --- 44,48 ---- elif os.name == "posix": # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump ! import re, tempfile, errno def _findLib_gcc(name): Index: __init__.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/__init__.py,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** __init__.py 23 May 2006 20:27:36 -0000 1.92 --- __init__.py 22 Jun 2006 19:21:10 -0000 1.93 *************** *** 1,2 **** --- 1,5 ---- + ###################################################################### + # This file should be kept compatible with Python 2.3, see PEP 291. # + ###################################################################### """create and manipulate C data types in Python""" *************** *** 75,79 **** argtypes: a sequence specifying the argument types ! The function prototype can be called in three ways to create a callable object: --- 78,82 ---- argtypes: a sequence specifying the argument types ! The function prototype can be called in different ways to create a callable object: Index: _endian.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/_endian.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _endian.py 14 Mar 2006 19:29:47 -0000 1.3 --- _endian.py 22 Jun 2006 19:21:10 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + ###################################################################### + # This file should be kept compatible with Python 2.3, see PEP 291. # + ###################################################################### import sys from ctypes import * |