pywin32-checkins Mailing List for Python for Windows Extensions (Page 91)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2007-05-24 13:00:11
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15452 Modified Files: genpy.py util.py Log Message: Pass the CLSID of the items in an interator. Via [ 1707700 ] Iterator is missing automatic cast Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** genpy.py 7 Feb 2007 23:12:31 -0000 1.51 --- genpy.py 24 May 2007 13:00:03 -0000 1.52 *************** *** 507,511 **** print >> stream, '\t\t"Return a Python iterator for this object"' print >> stream, '\t\tob = self._oleobj_.InvokeTypes(%d,LCID,%d,(13, 10),())' % (pythoncom.DISPID_NEWENUM, enumEntry.desc[4]) ! print >> stream, '\t\treturn win32com.client.util.Iterator(ob)' # And 'old style' iterator support - magically used to simulate iterators # before Python grew them --- 507,511 ---- print >> stream, '\t\t"Return a Python iterator for this object"' print >> stream, '\t\tob = self._oleobj_.InvokeTypes(%d,LCID,%d,(13, 10),())' % (pythoncom.DISPID_NEWENUM, enumEntry.desc[4]) ! print >> stream, '\t\treturn win32com.client.util.Iterator(ob, %s)' % resultCLSID # And 'old style' iterator support - magically used to simulate iterators # before Python grew them Index: util.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/util.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** util.py 23 Oct 2003 07:14:19 -0000 1.2 --- util.py 24 May 2007 13:00:03 -0000 1.3 *************** *** 76,83 **** class Iterator: ! def __init__(self, enum): self._iter_ = iter(enum.QueryInterface(pythoncom.IID_IEnumVARIANT)) def __iter__(self): return self def next(self): ! return _get_good_object_(self._iter_.next()) --- 76,84 ---- class Iterator: ! def __init__(self, enum, resultCLSID = None): ! self.resultCLSID = resultCLSID self._iter_ = iter(enum.QueryInterface(pythoncom.IID_IEnumVARIANT)) def __iter__(self): return self def next(self): ! return _get_good_object_(self._iter_.next(), resultCLSID = self.resultCLSID) |
From: Mark H. <mha...@us...> - 2007-05-24 12:50:50
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11967/Pythonwin Modified Files: pythonpsheet.cpp pythonpsheet.h win32ctrlRichEdit.cpp win32ui.h win32uiExt.h win32uiole.cpp win32util.cpp win32virt.cpp win32win.cpp Log Message: Get pythonwin working in x64 - via "[ 1705634 ] VC8.0 build patch for AMD64 branch" - thanks to Steve Yin for his excellent contribution Index: win32ui.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32ui.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32ui.h 7 Oct 2004 08:45:24 -0000 1.3 --- win32ui.h 24 May 2007 12:50:50 -0000 1.4 *************** *** 268,274 **** BOOL call(); BOOL call(int); ! BOOL call(int, int); BOOL call(int, int, int); BOOL call(long); BOOL call(const char *); BOOL call(const char *, int); --- 268,277 ---- BOOL call(); BOOL call(int); ! BOOL call(DWORD, DWORD); ! BOOL call(BOOL, BOOL); ! BOOL call(int v1, DWORD v2) {return call((DWORD)v1, v2);} BOOL call(int, int, int); BOOL call(long); + BOOL call(UINT_PTR); BOOL call(const char *); BOOL call(const char *, int); *************** *** 289,292 **** --- 292,296 ---- BOOL call(CDC *pDC, CWnd *pWnd, int i); BOOL call(const MSG *); + BOOL call(WPARAM, LPARAM); BOOL call(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO*pHandlerInfo); BOOL call_args(PyObject *arglst); Index: pythonpsheet.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pythonpsheet.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pythonpsheet.h 2 Mar 2000 01:11:15 -0000 1.2 --- pythonpsheet.h 24 May 2007 12:50:50 -0000 1.3 *************** *** 36,40 **** afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); //}}AFX_MSG ! afx_msg LONG OnResizePage (UINT, LONG); DECLARE_MESSAGE_MAP() #ifdef _DEBUG --- 36,40 ---- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); //}}AFX_MSG ! afx_msg LRESULT OnResizePage (WPARAM, LPARAM); DECLARE_MESSAGE_MAP() #ifdef _DEBUG Index: win32win.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32win.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** win32win.cpp 7 Apr 2007 05:23:31 -0000 1.12 --- win32win.cpp 24 May 2007 12:50:50 -0000 1.13 *************** *** 615,619 **** pSearch = CWnd::FromHandlePermanent(wnd); // FromHandlePerm is thread specific! ! if (pSearch==NULL && GetWindowLong(wnd, GWL_WNDPROC)==(LONG)AfxGetAfxWndProc()) { /******* --- 615,619 ---- pSearch = CWnd::FromHandlePermanent(wnd); // FromHandlePerm is thread specific! ! if (pSearch==NULL && GetWindowLong(wnd, GWLP_WNDPROC)==(LONG)AfxGetAfxWndProc()) { /******* *************** *** 2798,2803 **** // Convert the list of point tuples into an array of POINT structs int num = PyList_Size (point_list); POINT * point_array = new POINT[num]; ! for (int i=0; i < num; i++) { PyObject * point_tuple = PyList_GetItem (point_list, i); --- 2798,2804 ---- // Convert the list of point tuples into an array of POINT structs int num = PyList_Size (point_list); + int i; POINT * point_array = new POINT[num]; ! for (i=0; i < num; i++) { PyObject * point_tuple = PyList_GetItem (point_list, i); Index: pythonpsheet.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pythonpsheet.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pythonpsheet.cpp 20 Mar 2006 00:26:27 -0000 1.3 --- pythonpsheet.cpp 24 May 2007 12:50:50 -0000 1.4 *************** *** 246,250 **** } ! LONG CPythonPropertySheet::OnResizePage (UINT, LONG) { // resize the page --- 246,250 ---- } ! LRESULT CPythonPropertySheet::OnResizePage (WPARAM, LPARAM) { // resize the page Index: win32uiExt.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiExt.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** win32uiExt.h 20 Mar 2006 00:26:27 -0000 1.9 --- win32uiExt.h 24 May 2007 12:50:50 -0000 1.10 *************** *** 229,237 **** T::OnPaint(); } ! afx_msg void OnTimer(UINT nIDEvent) { // @pyvirtual void|PyCWnd|OnTimer|Called for the WM_TIMER message. // @pyparm int|nIDEvent||Specifies the identifier of the timer. CVirtualHelper helper( "OnTimer", this ); ! if (!helper.HaveHandler() || !helper.call(static_cast<int>(nIDEvent))) T::OnTimer(nIDEvent); } --- 229,237 ---- T::OnPaint(); } ! afx_msg void OnTimer(UINT_PTR nIDEvent) { // @pyvirtual void|PyCWnd|OnTimer|Called for the WM_TIMER message. // @pyparm int|nIDEvent||Specifies the identifier of the timer. CVirtualHelper helper( "OnTimer", this ); ! if (!helper.HaveHandler() || !helper.call(nIDEvent)) T::OnTimer(nIDEvent); } *************** *** 291,295 **** T::OnNcCalcSize(bCalcValidRects, lpncsp); } ! afx_msg UINT OnNcHitTest(CPoint pt) { // @pyvirtual int|PyCWnd|OnNcHitTest|Called for the WM_NCHITTEST message. // @xref <om PyCWnd.OnNcHitTest> --- 291,301 ---- T::OnNcCalcSize(bCalcValidRects, lpncsp); } ! afx_msg ! #ifdef _M_X64 // add one more thing to things I don't understand.. ! LRESULT ! #else ! UINT ! #endif ! OnNcHitTest(CPoint pt) { // @pyvirtual int|PyCWnd|OnNcHitTest|Called for the WM_NCHITTEST message. // @xref <om PyCWnd.OnNcHitTest> *************** *** 389,392 **** --- 395,399 ---- }; + #define ThisClass CPythonWndFramework<T> template <class T> const AFX_MSGMAP_ENTRY CPythonWndFramework<T>::_messageEntries[] = { *************** *** 410,414 **** {0, 0, 0, 0, AfxSig_end, (AFX_PMSG)0 } }; ! template <class T> --- 417,421 ---- {0, 0, 0, 0, AfxSig_end, (AFX_PMSG)0 } }; ! #undef ThisClass template <class T> *************** *** 982,989 **** template <class T> const AFX_MSGMAP_ENTRY CPythonPrtDlgFramework<T>::_messageEntries[] = { ! ON_MESSAGE(WM_INITDIALOG, HandleInitDialog) ! ON_COMMAND(IDC_PRINT_TO_FILE, HandlePrintToFile) ! ON_COMMAND(IDC_PRINT_COLLATE, HandleCollate) ! ON_COMMAND_RANGE(IDC_PRINT_RANGE_ALL, IDC_PRINT_RANGE_PAGES, HandlePrintRange) {0, 0, 0, 0, AfxSig_end, (AFX_PMSG)0 } }; --- 989,996 ---- template <class T> const AFX_MSGMAP_ENTRY CPythonPrtDlgFramework<T>::_messageEntries[] = { ! ON_MESSAGE(WM_INITDIALOG, &CPythonPrtDlgFramework<T>::HandleInitDialog) ! ON_COMMAND(IDC_PRINT_TO_FILE, &CPythonPrtDlgFramework<T>::HandlePrintToFile) ! ON_COMMAND(IDC_PRINT_COLLATE, &CPythonPrtDlgFramework<T>::HandleCollate) ! ON_COMMAND_RANGE(IDC_PRINT_RANGE_ALL, IDC_PRINT_RANGE_PAGES, &CPythonPrtDlgFramework<T>::HandlePrintRange) {0, 0, 0, 0, AfxSig_end, (AFX_PMSG)0 } }; Index: win32ctrlRichEdit.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32ctrlRichEdit.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32ctrlRichEdit.cpp 16 Oct 2000 05:46:52 -0000 1.2 --- win32ctrlRichEdit.cpp 24 May 2007 12:50:50 -0000 1.3 *************** *** 80,84 **** } ! DWORD CALLBACK PyCRichEditCallbackIn(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb) { // documentation for ths function seems to be wrong WRT return values. --- 80,84 ---- } ! DWORD CALLBACK PyCRichEditCallbackIn(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb) { // documentation for ths function seems to be wrong WRT return values. *************** *** 109,118 **** } ! DWORD CALLBACK PyCRichEditCallbackOut(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb) { CEnterLeavePython _celp; int retval = 0; // default abort stream PyObject *method = (PyObject *)dwCookie; ! PyObject *args = Py_BuildValue("(s#)", pbBuff, cb); PyObject *result = gui_call_object( method, args ); Py_DECREF(args); --- 109,118 ---- } ! DWORD CALLBACK PyCRichEditCallbackOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb) { CEnterLeavePython _celp; int retval = 0; // default abort stream PyObject *method = (PyObject *)dwCookie; ! PyObject *args = Py_BuildValue("(s#)", pbBuff, (Py_ssize_t)cb); PyObject *result = gui_call_object( method, args ); Py_DECREF(args); Index: win32util.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32util.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** win32util.cpp 3 Nov 2004 20:36:28 -0000 1.7 --- win32util.cpp 24 May 2007 12:50:50 -0000 1.8 *************** *** 63,68 **** virtual PyObject *getattr(char *name); virtual int setattr(char *name, PyObject *v); ! static PyObject *getitem(PyObject *self, int index); ! static int getlength(PyObject *self); CString repr(); protected: --- 63,68 ---- virtual PyObject *getattr(char *name); virtual int setattr(char *name, PyObject *v); ! static PyObject *getitem(PyObject *self, Py_ssize_t index); ! static Py_ssize_t getlength(PyObject *self); CString repr(); protected: *************** *** 111,115 **** } ! /* static */ int PyCRect::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old --- 111,115 ---- } ! /* static */ Py_ssize_t PyCRect::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old *************** *** 118,122 **** } ! /* static */ PyObject *PyCRect::getitem(PyObject *self, int index) { PyCRect *p = (PyCRect *)self; --- 118,122 ---- } ! /* static */ PyObject *PyCRect::getitem(PyObject *self, Py_ssize_t index) { PyCRect *p = (PyCRect *)self; *************** *** 883,887 **** &pFmt->dwMask, // @tupleitem 0|int|mask|The mask to use. Bits in this mask indicate which of the following parameters are interpreted. Must be a combination the win32con.PFM_* constants. &pFmt->wNumbering, // @tupleitem 1|int|numbering|The numbering style to use. ! &pFmt->wReserved, // @tupleitem 2|int|yHeight|Reserved &pFmt->dxStartIndent, // @tupleitem 3|int|dxStartIndent|Indentation of the first line. &pFmt->dxRightIndent,// @tupleitem 4|int|dxRightIndent|Indentation from the right. --- 883,887 ---- &pFmt->dwMask, // @tupleitem 0|int|mask|The mask to use. Bits in this mask indicate which of the following parameters are interpreted. Must be a combination the win32con.PFM_* constants. &pFmt->wNumbering, // @tupleitem 1|int|numbering|The numbering style to use. ! &pFmt->wEffects, // @tupleitem 2|int|yHeight|Reserved &pFmt->dxStartIndent, // @tupleitem 3|int|dxStartIndent|Indentation of the first line. &pFmt->dxRightIndent,// @tupleitem 4|int|dxRightIndent|Indentation from the right. *************** *** 918,922 **** pFmt->dwMask, pFmt->wNumbering, ! pFmt->wReserved, pFmt->dxStartIndent, pFmt->dxRightIndent, --- 918,922 ---- pFmt->dwMask, pFmt->wNumbering, ! pFmt->wEffects, pFmt->dxStartIndent, pFmt->dxRightIndent, Index: win32virt.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32virt.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32virt.cpp 20 Nov 2006 12:36:41 -0000 1.4 --- win32virt.cpp 24 May 2007 12:50:50 -0000 1.5 *************** *** 132,136 **** return do_call(arglst); } ! BOOL CVirtualHelper::call(int val, int val2) { if (!handler) return FALSE; --- 132,136 ---- return do_call(arglst); } ! BOOL CVirtualHelper::call(DWORD val, DWORD val2) { if (!handler) return FALSE; *************** *** 139,142 **** --- 139,150 ---- return do_call(arglst); } + BOOL CVirtualHelper::call(BOOL v1, BOOL v2) + { + if (!handler) return FALSE; + CEnterLeavePython _celp; + PyObject *arglst = Py_BuildValue("(NN)",PyBool_FromLong(v1), PyBool_FromLong(v2)); + return do_call(arglst); + } + BOOL CVirtualHelper::call(int val1, int val2, int val3) { *************** *** 154,157 **** --- 162,173 ---- } + BOOL CVirtualHelper::call(UINT_PTR val) + { + if (!handler) return FALSE; + CEnterLeavePython _celp; + PyObject *arglst = Py_BuildValue("(N)",PyWinObject_FromULONG_PTR(val)); + return do_call(arglst); + } + BOOL CVirtualHelper::call(const char *val) { *************** *** 416,419 **** --- 432,443 ---- } + BOOL CVirtualHelper::call(WPARAM w, LPARAM l) + { + if (!handler) return FALSE; + CEnterLeavePython _celp; + PyObject *arglst = Py_BuildValue("NN",PyWinObject_FromPARAM(w), PyWinObject_FromPARAM(l)); + return do_call(arglst); + } + BOOL CVirtualHelper::retnone() { Index: win32uiole.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiole.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32uiole.cpp 10 Aug 2006 10:11:06 -0000 1.6 --- win32uiole.cpp 24 May 2007 12:50:50 -0000 1.7 *************** *** 11,15 **** --- 11,17 ---- // version does *not* give the error. Whatever. #include "transact.h" + #ifndef _M_X64 #include "afxdao.h" + #endif #if _MFC_VER >= 0x0700 *************** *** 88,91 **** --- 90,96 ---- CHECK_NO_ARGS2(args, "DaoGetEngine"); + # ifdef _M_X64 + return NULL; + # else AfxDaoInit(); DAODBEngine* pEngine = AfxDaoGetEngine(); *************** *** 96,99 **** --- 101,105 ---- pEngine->Release(); return PyCom_PyObjectFromIUnknown(pDisp, IID_IDispatch, FALSE); + #endif } |
From: Mark H. <mha...@us...> - 2007-05-24 12:50:50
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11967 Modified Files: setup.py Log Message: Get pythonwin working in x64 - via "[ 1705634 ] VC8.0 build patch for AMD64 branch" - thanks to Steve Yin for his excellent contribution Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** setup.py 24 May 2007 06:01:04 -0000 1.58 --- setup.py 24 May 2007 12:50:50 -0000 1.59 *************** *** 583,588 **** # Not sure how to make this completely generic, and there is no # need at this stage. ! if is_32bit: ! self._build_scintilla() # Copy cpp lib files needed to create Python COM extensions clib_files = (['win32', 'pywintypes%s.lib'], --- 583,587 ---- # Not sure how to make this completely generic, and there is no # need at this stage. ! self._build_scintilla() # Copy cpp lib files needed to create Python COM extensions clib_files = (['win32', 'pywintypes%s.lib'], *************** *** 766,769 **** --- 765,771 ---- ext.extra_link_args.append("/PDB:%s\%s.pdb" % (pch_dir, ext.name)) + # enable unwind semantics - some stuff needs it and I can't see + # it hurting + ext.extra_compile_args.append("/EHsc") self.swig_cpp = True *************** *** 1329,1339 **** ] ! pythonwin_extensions = [] if is_32bit: pythonwin_extensions += [ - WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'], - pch_header="stdafx.h", base_address=dll_base_address), - WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", - windows_h_version = 0x500), WinExt_pythonwin("dde", pch_header="stdafxdde.h"), ] --- 1331,1342 ---- ] ! pythonwin_extensions = [ ! WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'], ! pch_header="stdafx.h", base_address=dll_base_address), ! WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", ! windows_h_version = 0x500), ! ] if is_32bit: pythonwin_extensions += [ WinExt_pythonwin("dde", pch_header="stdafxdde.h"), ] *************** *** 1371,1379 **** extra_link_args=["/SUBSYSTEM:CONSOLE"], libraries = "user32 advapi32 ole32 shell32"), - ] - if is_32bit: - W32_exe_files += [ WinExt_pythonwin("Pythonwin", extra_link_args=["/SUBSYSTEM:WINDOWS"]), ! ] # Special definitions for SWIG. --- 1374,1379 ---- extra_link_args=["/SUBSYSTEM:CONSOLE"], libraries = "user32 advapi32 ole32 shell32"), WinExt_pythonwin("Pythonwin", extra_link_args=["/SUBSYSTEM:WINDOWS"]), ! ] # Special definitions for SWIG. |
From: Mark H. <mha...@us...> - 2007-05-24 12:50:50
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11967/Pythonwin/Scintilla/win32 Modified Files: PlatWin.cxx scintilla_vc6.mak Log Message: Get pythonwin working in x64 - via "[ 1705634 ] VC8.0 build patch for AMD64 branch" - thanks to Steve Yin for his excellent contribution Index: scintilla_vc6.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32/scintilla_vc6.mak,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** scintilla_vc6.mak 25 Nov 2003 10:45:21 -0000 1.2 --- scintilla_vc6.mak 24 May 2007 12:50:50 -0000 1.3 *************** *** 37,41 **** #-Zc:forScope -Zc:wchar_t ! CXXFLAGS=-Zi -TP -W4 # For something scary:-Wp64 CXXDEBUG=-Od -MTd -DDEBUG --- 37,41 ---- #-Zc:forScope -Zc:wchar_t ! CXXFLAGS=-Zi -TP -W4 -D_CRT_SECURE_NO_DEPRECATE # For something scary:-Wp64 CXXDEBUG=-Od -MTd -DDEBUG Index: PlatWin.cxx =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/win32/PlatWin.cxx,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PlatWin.cxx 25 Nov 2003 10:45:21 -0000 1.12 --- PlatWin.cxx 24 May 2007 12:50:50 -0000 1.13 *************** *** 953,957 **** void Draw(DRAWITEMSTRUCT *pDrawItem); long WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); ! static long PASCAL StaticWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); }; --- 953,957 ---- void Draw(DRAWITEMSTRUCT *pDrawItem); long WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); ! static LRESULT PASCAL StaticWndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam); }; *************** *** 1183,1187 **** } ! long PASCAL ListBoxX::StaticWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { if (iMessage == WM_CREATE) { --- 1183,1187 ---- } ! LRESULT PASCAL ListBoxX::StaticWndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { if (iMessage == WM_CREATE) { |
From: Mark H. <mha...@us...> - 2007-05-24 12:50:50
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11967/Pythonwin/Scintilla/src Modified Files: Editor.h Log Message: Get pythonwin working in x64 - via "[ 1705634 ] VC8.0 build patch for AMD64 branch" - thanks to Steve Yin for his excellent contribution Index: Editor.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla/src/Editor.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Editor.h 25 Nov 2003 10:45:21 -0000 1.13 --- Editor.h 24 May 2007 12:50:50 -0000 1.14 *************** *** 426,430 **** void NotifyDeleted(Document *document, void *userData); void NotifyStyleNeeded(Document *doc, void *userData, int endPos); ! void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam); void PageMove(int direction, selTypes sel=noSel, bool stuttered = false); --- 426,430 ---- void NotifyDeleted(Document *document, void *userData); void NotifyStyleNeeded(Document *doc, void *userData, int endPos); ! void NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long lParam); void PageMove(int direction, selTypes sel=noSel, bool stuttered = false); |
From: Mark H. <mha...@us...> - 2007-05-24 06:54:50
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10778/win32/src Modified Files: PyWinTypes.h Log Message: Correct an #ifdef checking for VS8 Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** PyWinTypes.h 24 May 2007 06:01:05 -0000 1.39 --- PyWinTypes.h 24 May 2007 06:54:50 -0000 1.40 *************** *** 163,167 **** // win32 structures that still use 'unsigned short' now fail from C++ with // VS8 so we provide a couple of helpers. ! #if PY_VERSION_HEX >= 0x02060000 && _MSC_VER > 1500 inline BOOL PyWinObject_AsWCHAR(PyObject *stringObject, unsigned short **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL) { --- 163,167 ---- // win32 structures that still use 'unsigned short' now fail from C++ with // VS8 so we provide a couple of helpers. ! #if _MSC_VER >= 1400 inline BOOL PyWinObject_AsWCHAR(PyObject *stringObject, unsigned short **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL) { |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:35
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32com/src/extensions Modified Files: PyFUNCDESC.cpp PySTGMEDIUM.cpp PyTYPEATTR.cpp PyVARDESC.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyTYPEATTR.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyTYPEATTR.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyTYPEATTR.cpp 28 Mar 2007 12:30:33 -0000 1.2 --- PyTYPEATTR.cpp 24 May 2007 06:01:04 -0000 1.3 *************** *** 178,182 **** // Sequence stuff to provide compatibility with tuples. ! /* static */ int PyTYPEATTR::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old --- 178,182 ---- // Sequence stuff to provide compatibility with tuples. ! /* static */ Py_ssize_t PyTYPEATTR::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old *************** *** 185,189 **** } ! /* static */ PyObject *PyTYPEATTR::getitem(PyObject *self, int index) { PyTYPEATTR *p = (PyTYPEATTR *)self; --- 185,189 ---- } ! /* static */ PyObject *PyTYPEATTR::getitem(PyObject *self, Py_ssize_t index) { PyTYPEATTR *p = (PyTYPEATTR *)self; Index: PySTGMEDIUM.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PySTGMEDIUM.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PySTGMEDIUM.cpp 20 May 2005 23:25:49 -0000 1.6 --- PySTGMEDIUM.cpp 24 May 2007 06:01:04 -0000 1.7 *************** *** 48,52 **** case TYMED_HGLOBAL: { const void * buf = NULL; ! int cb = 0; if (PyObject_AsReadBuffer(ob,&buf,&cb)==-1) return PyErr_Format(PyExc_TypeError, "tymed value of %d requires a string/unicode/buffer", tymed); --- 48,52 ---- case TYMED_HGLOBAL: { const void * buf = NULL; ! Py_ssize_t cb = 0; if (PyObject_AsReadBuffer(ob,&buf,&cb)==-1) return PyErr_Format(PyExc_TypeError, "tymed value of %d requires a string/unicode/buffer", tymed); *************** *** 157,161 **** break; case TYMED_HGLOBAL: { ! UINT cb = GlobalSize(medium.hGlobal); pDest->hGlobal = GlobalAlloc(GMEM_FIXED, cb); if (!pDest->hGlobal) { --- 157,161 ---- break; case TYMED_HGLOBAL: { ! SIZE_T cb = GlobalSize(medium.hGlobal); pDest->hGlobal = GlobalAlloc(GMEM_FIXED, cb); if (!pDest->hGlobal) { *************** *** 168,172 **** case TYMED_FILE: if (medium.lpszFileName) { ! int cch = wcslen(medium.lpszFileName) + 1; if (!(pDest->lpszFileName = (WCHAR *)CoTaskMemAlloc(sizeof(WCHAR) * cch))) { PyErr_NoMemory(); --- 168,172 ---- case TYMED_FILE: if (medium.lpszFileName) { ! size_t cch = wcslen(medium.lpszFileName) + 1; if (!(pDest->lpszFileName = (WCHAR *)CoTaskMemAlloc(sizeof(WCHAR) * cch))) { PyErr_NoMemory(); Index: PyVARDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyVARDESC.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyVARDESC.cpp 7 Feb 2007 23:12:31 -0000 1.2 --- PyVARDESC.cpp 24 May 2007 06:01:04 -0000 1.3 *************** *** 197,201 **** // Sequence stuff to provide compatibility with tuples. ! /* static */ int PyVARDESC::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old --- 197,201 ---- // Sequence stuff to provide compatibility with tuples. ! /* static */ Py_ssize_t PyVARDESC::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old *************** *** 204,208 **** } ! /* static */ PyObject *PyVARDESC::getitem(PyObject *self, int index) { PyVARDESC *p = (PyVARDESC *)self; --- 204,208 ---- } ! /* static */ PyObject *PyVARDESC::getitem(PyObject *self, Py_ssize_t index) { PyVARDESC *p = (PyVARDESC *)self; Index: PyFUNCDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyFUNCDESC.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyFUNCDESC.cpp 1 Sep 1999 23:03:32 -0000 1.1 --- PyFUNCDESC.cpp 24 May 2007 06:01:04 -0000 1.2 *************** *** 73,77 **** fd->cScodes = (short)PySequence_Length(pyfd->scodeArray); fd->lprgscode = (SCODE *)AllocMore(fd, sizeof(SCODE)*fd->cScodes); ! for (int i=0;i<fd->cScodes;i++) { PyObject *sub=PySequence_GetItem(ob, i); if (sub==NULL) goto done; --- 73,77 ---- fd->cScodes = (short)PySequence_Length(pyfd->scodeArray); fd->lprgscode = (SCODE *)AllocMore(fd, sizeof(SCODE)*fd->cScodes); ! for (Py_ssize_t i=0;i<fd->cScodes;i++) { PyObject *sub=PySequence_GetItem(ob, i); if (sub==NULL) goto done; *************** *** 220,224 **** // Sequence stuff to provide compatibility with tuples. ! /* static */ int PyFUNCDESC::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old --- 220,224 ---- // Sequence stuff to provide compatibility with tuples. ! /* static */ Py_ssize_t PyFUNCDESC::getlength(PyObject *self) { // NEVER CHANGE THIS - you will break all the old *************** *** 227,231 **** } ! /* static */ PyObject *PyFUNCDESC::getitem(PyObject *self, int index) { PyFUNCDESC *p = (PyFUNCDESC *)self; --- 227,231 ---- } ! /* static */ PyObject *PyFUNCDESC::getitem(PyObject *self, Py_ssize_t index) { PyFUNCDESC *p = (PyFUNCDESC *)self; |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:35
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340 Modified Files: setup.py Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** setup.py 25 Apr 2007 03:24:23 -0000 1.57 --- setup.py 24 May 2007 06:01:04 -0000 1.58 *************** *** 46,49 **** --- 46,54 ---- or to build and install a debug version: python setup.py -q build --debug install + + To build 64bit versions of this, you must manually setup your compiler and SDK environment + variables, then set the environment variables 'DISTUTILS_USE_SDK' and 'MSSdk' to any value + before running setup. This will prevent distutils trying to sniff out the correct directories, which + it generally fails to do these days... """ # Originally by Thomas Heller, started in 2000 or so. *************** *** 59,62 **** --- 64,76 ---- from distutils.filelist import FileList from distutils.errors import DistutilsExecError + try: + from distutils.msvccompiler import get_build_architecture + except ImportError: + def get_build_architecture(): + return "Intel" + + ARCHITECTURES_64 = ("Itanium", "AMD64") + is_64bit = get_build_architecture() in ARCHITECTURES_64 + is_32bit = not is_64bit import types, glob *************** *** 160,164 **** except EnvironmentError: pass ! # 4. Failing this just try a few well-known default install locations. progfiles = os.environ.get("ProgramFiles", r"C:\Program Files") defaultlocs = [ --- 174,192 ---- except EnvironmentError: pass ! # 4. Vista's SDK ! try: ! key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, ! r"Software\Microsoft\Microsoft SDKs\Windows") ! sdkdir, ignore = _winreg.QueryValueEx(key, "CurrentInstallFolder") ! except EnvironmentError: ! pass ! else: ! if DEBUG: ! print r"PSDK: try 'HKLM\Software\Microsoft\MicrosoftSDKs"\ ! "\Windows\CurrentInstallFolder': '%s'" % sdkdir ! if os.path.isfile(os.path.join(sdkdir, landmark)): ! return sdkdir ! ! # 5. Failing this just try a few well-known default install locations. progfiles = os.environ.get("ProgramFiles", r"C:\Program Files") defaultlocs = [ *************** *** 215,219 **** sources.extend(self.get_source_files(dsp_file)) extra_link_args = extra_link_args or [] ! extra_link_args.append("/MACHINE:ix86") # Some of our swigged files behave differently in distutils vs # MSVC based builds. Always define DISTUTILS_BUILD so they can tell. --- 243,250 ---- sources.extend(self.get_source_files(dsp_file)) extra_link_args = extra_link_args or [] ! if is_64bit: ! extra_link_args.append("/MACHINE:%s" % get_build_architecture()) ! else: ! extra_link_args.append("/MACHINE:ix86") # Some of our swigged files behave differently in distutils vs # MSVC based builds. Always define DISTUTILS_BUILD so they can tell. *************** *** 388,391 **** --- 419,426 ---- self.include_dirs.insert(0, extra) extra = os.path.join(sdk_dir, 'lib') + assert os.path.isdir(extra) + if is_64bit: + extra = os.path.join(extra, 'x64') + assert os.path.isdir(extra), extra if extra not in self.library_dirs and os.path.isdir(extra): self.library_dirs.insert(0, extra) *************** *** 424,428 **** break else: ! raise RuntimeError, "Can't find a version in Windows.h" if ext.windows_h_version > self.windows_h_version: return "WINDOWS.H with version 0x%x is required, but only " \ --- 459,468 ---- break else: ! if is_64bit: ! # *sob* ! print "x64 build - assuming winver == 0x600" ! self.windows_h_version = 0x600 ! else: ! raise RuntimeError, "Can't find a version in Windows.h" if ext.windows_h_version > self.windows_h_version: return "WINDOWS.H with version 0x%x is required, but only " \ *************** *** 435,439 **** # module method in early Python versions get_msvc_paths = msvccompiler.get_msvc_paths ! look_dirs = self.include_dirs + get_msvc_paths("include") for h in ext.optional_headers: for d in look_dirs: --- 475,481 ---- # module method in early Python versions get_msvc_paths = msvccompiler.get_msvc_paths ! look_dirs = self.include_dirs ! if is_32bit: # don't sniff MSVC paths on x64 ! get_msvc_paths("include") for h in ext.optional_headers: for d in look_dirs: *************** *** 465,502 **** return None # no reason - it can be built! ! def build_extensions(self): ! # Is there a better way than this? ! # Just one GUIDS.CPP and it gives trouble on mainwin too ! # Maybe I should just rename the file, but a case-only rename is likely to be ! # worse! ! if ".CPP" not in self.compiler.src_extensions: ! self.compiler._cpp_extensions.append(".CPP") ! self.compiler.src_extensions.append(".CPP") ! ! # First, sanity-check the 'extensions' list ! self.check_extensions_list(self.extensions) ! ! self.found_libraries = {} ! ! # Here we hack a "pywin32" directory (one of 'win32', 'win32com', ! # 'pythonwin' etc), as distutils doesn't seem to like the concept ! # of multiple top-level directories. ! assert self.package is None ! for ext in self.extensions: ! try: ! self.package = ext.get_pywin32_dir() ! except AttributeError: ! raise RuntimeError, "Not a win32 package!" ! self.build_extension(ext) ! ! for ext in W32_exe_files: ! try: ! self.package = ext.get_pywin32_dir() ! except AttributeError: ! raise RuntimeError, "Not a win32 package!" ! self.build_exefile(ext) ! ! # Not sure how to make this completely generic, and there is no ! # need at this stage. path = 'pythonwin\\Scintilla' makefile = 'makefile_pythonwin' --- 507,511 ---- return None # no reason - it can be built! ! def _build_scintilla(self): path = 'pythonwin\\Scintilla' makefile = 'makefile_pythonwin' *************** *** 540,543 **** --- 549,588 ---- os.path.join(self.build_lib, "pythonwin")) + def build_extensions(self): + # Is there a better way than this? + # Just one GUIDS.CPP and it gives trouble on mainwin too + # Maybe I should just rename the file, but a case-only rename is likely to be + # worse! + if ".CPP" not in self.compiler.src_extensions: + self.compiler._cpp_extensions.append(".CPP") + self.compiler.src_extensions.append(".CPP") + + # First, sanity-check the 'extensions' list + self.check_extensions_list(self.extensions) + + self.found_libraries = {} + + # Here we hack a "pywin32" directory (one of 'win32', 'win32com', + # 'pythonwin' etc), as distutils doesn't seem to like the concept + # of multiple top-level directories. + assert self.package is None + for ext in self.extensions: + try: + self.package = ext.get_pywin32_dir() + except AttributeError: + raise RuntimeError, "Not a win32 package!" + self.build_extension(ext) + + for ext in W32_exe_files: + try: + self.package = ext.get_pywin32_dir() + except AttributeError: + raise RuntimeError, "Not a win32 package!" + self.build_exefile(ext) + + # Not sure how to make this completely generic, and there is no + # need at this stage. + if is_32bit: + self._build_scintilla() # Copy cpp lib files needed to create Python COM extensions clib_files = (['win32', 'pywintypes%s.lib'], *************** *** 679,682 **** --- 724,729 ---- if why is not None: self.excluded_extensions.append((ext, why)) + assert why, "please give a reason, or None" + print "Skipping", ext.name, why return self.current_extension = ext *************** *** 684,688 **** if not self.mingw32 and ext.pch_header: ext.extra_compile_args = ext.extra_compile_args or [] ! ext.extra_compile_args.append("/YX"+ext.pch_header) pch_name = os.path.join(self.build_temp, ext.name) + ".pch" ext.extra_compile_args.append("/Fp"+pch_name) --- 731,736 ---- if not self.mingw32 and ext.pch_header: ext.extra_compile_args = ext.extra_compile_args or [] ! if is_32bit: ! ext.extra_compile_args.append("/YX"+ext.pch_header) pch_name = os.path.join(self.build_temp, ext.name) + ".pch" ext.extra_compile_args.append("/Fp"+pch_name) *************** *** 1113,1116 **** --- 1161,1166 ---- extra_compile_args = ['-DUNICODE', '-D_UNICODE', '-DWINNT'], ), + ] + win32_extensions += [ WinExt_win32('servicemanager', extra_compile_args = ['-DUNICODE', '-D_UNICODE', *************** *** 1279,1289 **** ] ! pythonwin_extensions = [ ! WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'], ! pch_header="stdafx.h", base_address=dll_base_address), ! WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", ! windows_h_version = 0x500), ! WinExt_pythonwin("dde", pch_header="stdafxdde.h"), ! ] # win32ui is large, so we reserve more bytes than normal dll_base_address += 0x100000 --- 1329,1341 ---- ] ! pythonwin_extensions = [] ! if is_32bit: ! pythonwin_extensions += [ ! WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'], ! pch_header="stdafx.h", base_address=dll_base_address), ! WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", ! windows_h_version = 0x500), ! WinExt_pythonwin("dde", pch_header="stdafxdde.h"), ! ] # win32ui is large, so we reserve more bytes than normal dll_base_address += 0x100000 *************** *** 1319,1323 **** extra_link_args=["/SUBSYSTEM:CONSOLE"], libraries = "user32 advapi32 ole32 shell32"), ! WinExt_pythonwin("Pythonwin", extra_link_args=["/SUBSYSTEM:WINDOWS"]), ] --- 1371,1378 ---- extra_link_args=["/SUBSYSTEM:CONSOLE"], libraries = "user32 advapi32 ole32 shell32"), ! ] ! if is_32bit: ! W32_exe_files += [ ! WinExt_pythonwin("Pythonwin", extra_link_args=["/SUBSYSTEM:WINDOWS"]), ] |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:35
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32com/src/include Modified Files: PyComTypeObjects.h Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyComTypeObjects.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyComTypeObjects.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyComTypeObjects.h 12 Jun 2004 13:31:51 -0000 1.4 --- PyComTypeObjects.h 24 May 2007 06:01:04 -0000 1.5 *************** *** 33,38 **** static void deallocFunc(PyObject *ob); ! static PyObject *getitem(PyObject *self, int index); ! static int getlength(PyObject *self); static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); --- 33,38 ---- static void deallocFunc(PyObject *ob); ! static PyObject *getitem(PyObject *self, Py_ssize_t index); ! static Py_ssize_t getlength(PyObject *self); static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); *************** *** 64,69 **** static void deallocFunc(PyObject *ob); ! static PyObject *getitem(PyObject *self, int index); ! static int getlength(PyObject *self); static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); --- 64,69 ---- static void deallocFunc(PyObject *ob); ! static PyObject *getitem(PyObject *self, Py_ssize_t index); ! static Py_ssize_t getlength(PyObject *self); static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); *************** *** 103,108 **** static void deallocFunc(PyObject *ob); ! static PyObject *getitem(PyObject *self, int index); ! static int getlength(PyObject *self); static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); --- 103,108 ---- static void deallocFunc(PyObject *ob); ! static PyObject *getitem(PyObject *self, Py_ssize_t index); ! static Py_ssize_t getlength(PyObject *self); static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:35
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32comext/adsi/src Modified Files: PyDSOPObjects.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyDSOPObjects.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyDSOPObjects.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyDSOPObjects.cpp 26 May 2005 11:39:30 -0000 1.1 --- PyDSOPObjects.cpp 24 May 2007 06:01:04 -0000 1.2 *************** *** 116,120 **** // object has no other (interesting) methods or attributes. // <nl>These objects are created via <om adsi.DSOP_SCOPE_INIT_INFOs>(size) ! int PyDSOP_SCOPE_INIT_INFOs_sq_length(PyObject *self) { PyDSOP_SCOPE_INIT_INFOs *p = (PyDSOP_SCOPE_INIT_INFOs *)self; --- 116,120 ---- // object has no other (interesting) methods or attributes. // <nl>These objects are created via <om adsi.DSOP_SCOPE_INIT_INFOs>(size) ! Py_ssize_t PyDSOP_SCOPE_INIT_INFOs_sq_length(PyObject *self) { PyDSOP_SCOPE_INIT_INFOs *p = (PyDSOP_SCOPE_INIT_INFOs *)self; *************** *** 122,126 **** } ! PyObject *PyDSOP_SCOPE_INIT_INFOs_sq_item(PyObject *self, int i) { PyDSOP_SCOPE_INIT_INFOs *p =(PyDSOP_SCOPE_INIT_INFOs *)self; --- 122,126 ---- } ! PyObject *PyDSOP_SCOPE_INIT_INFOs_sq_item(PyObject *self, Py_ssize_t i) { PyDSOP_SCOPE_INIT_INFOs *p =(PyDSOP_SCOPE_INIT_INFOs *)self; |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:34
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32com/src Modified Files: oleargs.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: oleargs.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/oleargs.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** oleargs.cpp 7 Feb 2007 23:12:31 -0000 1.37 --- oleargs.cpp 24 May 2007 06:01:04 -0000 1.38 *************** *** 398,407 **** if (dimNo==nDims && vt==VT_UI1 && obj->ob_type->tp_as_buffer) { PyBufferProcs *pb = obj->ob_type->tp_as_buffer; ! int bufSize; if (pb->bf_getreadbuffer && pb->bf_getsegcount && (*pb->bf_getsegcount)(obj, &bufSize)==1) { ! if (bufSize != numElements) { OleSetTypeError("Internal error - the buffer length is not the sequence length!"); return FALSE; --- 398,407 ---- if (dimNo==nDims && vt==VT_UI1 && obj->ob_type->tp_as_buffer) { PyBufferProcs *pb = obj->ob_type->tp_as_buffer; ! Py_ssize_t bufSize; if (pb->bf_getreadbuffer && pb->bf_getsegcount && (*pb->bf_getsegcount)(obj, &bufSize)==1) { ! if (PyWin_SAFE_DOWNCAST(bufSize, Py_ssize_t, LONG) != numElements) { OleSetTypeError("Internal error - the buffer length is not the sequence length!"); return FALSE; *************** *** 492,499 **** PyObject* ppyobDimensionSize; PyObject* ppyobItem; ! long lIndex; long lMinimalDimension = -1; long lActualDimension = -1; ! long lObjectSize; if (PyBuffer_Check(obItemCheck)) --- 492,499 ---- PyObject* ppyobDimensionSize; PyObject* ppyobItem; ! Py_ssize_t lIndex; long lMinimalDimension = -1; long lActualDimension = -1; ! Py_ssize_t lObjectSize; if (PyBuffer_Check(obItemCheck)) *************** *** 509,513 **** } if (lObjectSize != -1) { // A real sequence of size zero should be OK though. ! ppyobSize = PyInt_FromLong(lObjectSize); // Retrieve the stored size in this dimension --- 509,513 ---- } if (lObjectSize != -1) { // A real sequence of size zero should be OK though. ! ppyobSize = PyInt_FromSsize_t(lObjectSize); // Retrieve the stored size in this dimension *************** *** 521,525 **** } else { // Check if stored size in this dimension equals the size of the element to check ! long lStoredSize = PyInt_AsLong(ppyobDimensionSize); if (lStoredSize != lObjectSize) { --- 521,525 ---- } else { // Check if stored size in this dimension equals the size of the element to check ! Py_ssize_t lStoredSize = PyInt_AsSsize_t(ppyobDimensionSize); if (lStoredSize != lObjectSize) { |
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/win32/src Modified Files: PyACL.cpp PyDEVMODE.cpp PyIID.cpp PyLARGE_INTEGER.cpp PySECURITY_DESCRIPTOR.cpp PySID.cpp PySecurityObjects.h PyTime.cpp PyWinObjects.h PyWinTypes.h _winxptheme.i dbi.cpp odbc.cpp win32api_display.cpp win32clipboardmodule.cpp win32consolemodule.cpp win32credmodule.cpp win32crypt.i win32file.i win32gui.i win32rasmodule.cpp win32security.i win32security_sspi.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyWinObjects.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinObjects.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PyWinObjects.h 11 Jan 2007 13:13:48 -0000 1.11 --- PyWinObjects.h 24 May 2007 06:01:05 -0000 1.12 *************** *** 89,93 **** PyTime(DATE t); ! PyTime(long t); PyTime(const SYSTEMTIME &t); PyTime(const FILETIME &t); --- 89,93 ---- PyTime(DATE t); ! PyTime(time_t t); PyTime(const SYSTEMTIME &t); PyTime(const FILETIME &t); Index: PySECURITY_DESCRIPTOR.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PySECURITY_DESCRIPTOR.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PySECURITY_DESCRIPTOR.cpp 4 Dec 2006 04:56:08 -0000 1.18 --- PySECURITY_DESCRIPTOR.cpp 24 May 2007 06:01:05 -0000 1.19 *************** *** 83,87 **** PyObject *PyWinMethod_NewSECURITY_DESCRIPTOR(PyObject *self, PyObject *args) { ! int descriptor_len = SECURITY_DESCRIPTOR_MIN_LENGTH; if (PyArg_ParseTuple(args, "|l:SECURITY_DESCRIPTOR", &descriptor_len)){ PyObject *ret=new PySECURITY_DESCRIPTOR(descriptor_len); --- 83,87 ---- PyObject *PyWinMethod_NewSECURITY_DESCRIPTOR(PyObject *self, PyObject *args) { ! Py_ssize_t descriptor_len = SECURITY_DESCRIPTOR_MIN_LENGTH; if (PyArg_ParseTuple(args, "|l:SECURITY_DESCRIPTOR", &descriptor_len)){ PyObject *ret=new PySECURITY_DESCRIPTOR(descriptor_len); *************** *** 98,105 **** PyObject *obsd = NULL; PSECURITY_DESCRIPTOR psd; // @pyparmalt1 buffer|data||A buffer (eg, a string) with the raw bytes for the security descriptor. if (!PyArg_ParseTuple(args, "O:SECURITY_DESCRIPTOR", &obsd)) return NULL; ! if (PyObject_AsReadBuffer(obsd, (const void **)&psd, &descriptor_len)==-1){ PyErr_SetString(PyExc_TypeError,"Object has no data buffer"); return NULL; --- 98,106 ---- PyObject *obsd = NULL; PSECURITY_DESCRIPTOR psd; + Py_ssize_t buf_len; // @pyparmalt1 buffer|data||A buffer (eg, a string) with the raw bytes for the security descriptor. if (!PyArg_ParseTuple(args, "O:SECURITY_DESCRIPTOR", &obsd)) return NULL; ! if (PyObject_AsReadBuffer(obsd, (const void **)&psd, &buf_len)==-1){ PyErr_SetString(PyExc_TypeError,"Object has no data buffer"); return NULL; *************** *** 699,706 **** static PyBufferProcs PySECURITY_DESCRIPTOR_as_buffer = { ! (getreadbufferproc)PySECURITY_DESCRIPTOR::getreadbuf, ! (getwritebufferproc)0, ! (getsegcountproc)PySECURITY_DESCRIPTOR::getsegcount, ! (getcharbufferproc)0, }; --- 700,707 ---- static PyBufferProcs PySECURITY_DESCRIPTOR_as_buffer = { ! PySECURITY_DESCRIPTOR::getreadbuf, ! 0, ! PySECURITY_DESCRIPTOR::getsegcount, ! 0, }; *************** *** 736,740 **** }; ! PySECURITY_DESCRIPTOR::PySECURITY_DESCRIPTOR(unsigned cb /*= 0*/) { ob_type = &PySECURITY_DESCRIPTORType; --- 737,741 ---- }; ! PySECURITY_DESCRIPTOR::PySECURITY_DESCRIPTOR(Py_ssize_t cb /*= 0*/) { ob_type = &PySECURITY_DESCRIPTORType; *************** *** 786,790 **** } ! /*static*/ int PySECURITY_DESCRIPTOR::getreadbuf(PyObject *self, int index, const void **ptr) { if ( index != 0 ) { --- 787,791 ---- } ! /*static*/ Py_ssize_t PySECURITY_DESCRIPTOR::getreadbuf(PyObject *self, Py_ssize_t index, void **ptr) { if ( index != 0 ) { *************** *** 798,802 **** } ! /*static*/ int PySECURITY_DESCRIPTOR::getsegcount(PyObject *self, int *lenp) { if ( lenp ) --- 799,803 ---- } ! /*static*/ Py_ssize_t PySECURITY_DESCRIPTOR::getsegcount(PyObject *self, Py_ssize_t *lenp) { if ( lenp ) Index: win32api_display.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32api_display.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32api_display.cpp 1 Apr 2007 13:07:41 -0000 1.4 --- win32api_display.cpp 24 May 2007 06:01:05 -0000 1.5 *************** *** 176,180 **** { char *name, *value; ! int valuelen; name=PyString_AsString(obname); if (name==NULL) --- 176,180 ---- { char *name, *value; ! Py_ssize_t valuelen; name=PyString_AsString(obname); if (name==NULL) Index: win32consolemodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** win32consolemodule.cpp 11 Dec 2006 12:18:24 -0000 1.9 --- win32consolemodule.cpp 24 May 2007 06:01:05 -0000 1.10 *************** *** 966,969 **** --- 966,974 ---- } + #ifndef _WIN32_WINNT_LONGHORN + // 'reserved' ReadConsole param is defined as a PCONSOLE_READCONSOLE_CONTROL + // in Vista's SDK. If no such def exists, assume it's still 'void *' + # define PCONSOLE_READCONSOLE_CONTROL void * + #endif // @pymethod <o PyUNICODE>|PyConsoleScreenBuffer|ReadConsole|Reads characters from the console input buffer PyObject *PyConsoleScreenBuffer::PyReadConsole(PyObject *self, PyObject *args, PyObject *kwargs) *************** *** 980,984 **** if (buf==NULL) return PyErr_Format(PyExc_MemoryError, "ReadConsole: Unable to allocate buffer of %d bytes", nbrtoread*sizeof(WCHAR)); ! if (!ReadConsole(((PyConsoleScreenBuffer *)self)->m_handle, (LPVOID)buf, nbrtoread, &nbrread, reserved)) PyWin_SetAPIError("ReadConsole"); else --- 985,989 ---- if (buf==NULL) return PyErr_Format(PyExc_MemoryError, "ReadConsole: Unable to allocate buffer of %d bytes", nbrtoread*sizeof(WCHAR)); ! if (!ReadConsole(((PyConsoleScreenBuffer *)self)->m_handle, (LPVOID)buf, nbrtoread, &nbrread, (PCONSOLE_READCONSOLE_CONTROL)reserved)) PyWin_SetAPIError("ReadConsole"); else *************** *** 1173,1177 **** if (!PyWinObject_AsCOORD(obcoord, &pcoord, FALSE)) return NULL; ! buf=(WORD *)malloc(len*sizeof(WCHAR)); if (buf==NULL) return PyErr_Format(PyExc_MemoryError,"Unable to unicode buffer of %d characters", len); --- 1178,1182 ---- if (!PyWinObject_AsCOORD(obcoord, &pcoord, FALSE)) return NULL; ! buf=(WCHAR *)malloc(len*sizeof(WCHAR)); if (buf==NULL) return PyErr_Format(PyExc_MemoryError,"Unable to unicode buffer of %d characters", len); Index: PySecurityObjects.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PySecurityObjects.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PySecurityObjects.h 26 Jul 2004 06:47:16 -0000 1.11 --- PySecurityObjects.h 24 May 2007 06:01:05 -0000 1.12 *************** *** 60,64 **** BOOL SetSD(PSECURITY_DESCRIPTOR psd); ! PySECURITY_DESCRIPTOR(unsigned cb = 0); PySECURITY_DESCRIPTOR(PSECURITY_DESCRIPTOR psd); ~PySECURITY_DESCRIPTOR(void); --- 60,64 ---- BOOL SetSD(PSECURITY_DESCRIPTOR psd); ! PySECURITY_DESCRIPTOR(Py_ssize_t cb = 0); PySECURITY_DESCRIPTOR(PSECURITY_DESCRIPTOR psd); ~PySECURITY_DESCRIPTOR(void); *************** *** 71,76 **** static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); ! static int getreadbuf(PyObject *self, int index, const void **ptr); ! static int getsegcount(PyObject *self, int *lenp); static PyObject *Initialize(PyObject *self, PyObject *args); --- 71,76 ---- static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); ! static Py_ssize_t getreadbuf(PyObject *self, Py_ssize_t index, void **ptr); ! static Py_ssize_t getsegcount(PyObject *self, Py_ssize_t *lenp); static PyObject *Initialize(PyObject *self, PyObject *args); *************** *** 119,124 **** static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); ! static int getreadbuf(PyObject *self, int index, const void **ptr); ! static int getsegcount(PyObject *self, int *lenp); static PyObject *Initialize(PyObject *self, PyObject *args); --- 119,124 ---- static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); ! static Py_ssize_t getreadbuf(PyObject *self, Py_ssize_t index, void **ptr); ! static Py_ssize_t getsegcount(PyObject *self, Py_ssize_t *lenp); static PyObject *Initialize(PyObject *self, PyObject *args); Index: win32security.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security.i,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** win32security.i 7 Jan 2007 03:52:18 -0000 1.36 --- win32security.i 24 May 2007 06:01:06 -0000 1.37 *************** *** 6,10 **** %{ ! #define _WIN32_WINNT 0x0500 // We are 2k specific %} --- 6,10 ---- %{ ! #define _WIN32_WINNT 0x0501 // We are 2k specific %} Index: win32security_sspi.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security_sspi.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32security_sspi.cpp 13 Feb 2006 14:42:35 -0000 1.6 --- win32security_sspi.cpp 24 May 2007 06:01:06 -0000 1.7 *************** *** 18,22 **** // //////////////////////////////////////////////////////////////////////// ! int PySecBufferDesc_sq_length(PyObject *self) { PSecBufferDesc psecbufferdesc=((PySecBufferDesc *)self)->GetSecBufferDesc(); --- 18,22 ---- // //////////////////////////////////////////////////////////////////////// ! Py_ssize_t PySecBufferDesc_sq_length(PyObject *self) { PSecBufferDesc psecbufferdesc=((PySecBufferDesc *)self)->GetSecBufferDesc(); *************** *** 24,28 **** } ! PyObject *PySecBufferDesc_sq_item(PyObject *self, int i) { PySecBufferDesc *This=(PySecBufferDesc *)self; --- 24,28 ---- } ! PyObject *PySecBufferDesc_sq_item(PyObject *self, Py_ssize_t i) { PySecBufferDesc *This=(PySecBufferDesc *)self; *************** *** 36,40 **** } ! int PySecBufferDesc_sq_ass_item(PyObject *self, int i, PyObject *ob) { if (ob==NULL){ --- 36,40 ---- } ! int PySecBufferDesc_sq_ass_item(PyObject *self, Py_ssize_t i, PyObject *ob) { if (ob==NULL){ *************** *** 424,428 **** PySecBuffer *This=(PySecBuffer *)self; char *name, *value; ! int valuelen; name=PyString_AsString(obname); if (name==NULL) --- 424,428 ---- PySecBuffer *This=(PySecBuffer *)self; char *name, *value; ! Py_ssize_t valuelen; name=PyString_AsString(obname); if (name==NULL) *************** *** 432,436 **** return -1; PSecBuffer psecbuffer=This->GetSecBuffer(); ! if (valuelen>(int)This->maxbufsize){ PyErr_Format(PyExc_ValueError, "Data size (%d) greater than allocated buffer size (%d)",valuelen, This->maxbufsize); return -1; --- 432,436 ---- return -1; PSecBuffer psecbuffer=This->GetSecBuffer(); ! if (valuelen>(Py_ssize_t)This->maxbufsize){ PyErr_Format(PyExc_ValueError, "Data size (%d) greater than allocated buffer size (%d)",valuelen, This->maxbufsize); return -1; Index: PySID.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PySID.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PySID.cpp 27 Oct 2005 12:26:00 -0000 1.11 --- PySID.cpp 24 May 2007 06:01:05 -0000 1.12 *************** *** 12,16 **** { void *buf = NULL; ! int bufSize = 32; // @pyparm int|bufSize|32|Size for the SID buffer if (!PyArg_ParseTuple(args, "|i:SID", &bufSize)) { --- 12,16 ---- { void *buf = NULL; ! int bufSize = 32; // xxxxxx64 - should be Py_ssize_t - but passed as 'i' // @pyparm int|bufSize|32|Size for the SID buffer if (!PyArg_ParseTuple(args, "|i:SID", &bufSize)) { *************** *** 35,39 **** return NULL; } ! int numSubs = PySequence_Length(obSubs); if (numSubs>8) { PyErr_SetString(PyExc_TypeError, "sub authorities sequence size must be <= 8"); --- 35,39 ---- return NULL; } ! Py_ssize_t numSubs = PySequence_Length(obSubs); if (numSubs>8) { PyErr_SetString(PyExc_TypeError, "sub authorities sequence size must be <= 8"); *************** *** 51,55 **** } PSID pNew; ! if (!AllocateAndInitializeSid(&sid_ia, numSubs, sub0, sub1, sub2, sub3, sub4, sub5, sub6, sub7, &pNew)) return PyWin_SetAPIError("AllocateAndInitializeSid"); return new PySID(pNew); --- 51,55 ---- } PSID pNew; ! if (!AllocateAndInitializeSid(&sid_ia, (BYTE)numSubs, sub0, sub1, sub2, sub3, sub4, sub5, sub6, sub7, &pNew)) return PyWin_SetAPIError("AllocateAndInitializeSid"); return new PySID(pNew); *************** *** 191,198 **** static PyBufferProcs PySID_as_buffer = { ! (getreadbufferproc)PySID::getreadbuf, ! (getwritebufferproc)0, ! (getsegcountproc)PySID::getsegcount, ! (getcharbufferproc)0, }; --- 191,198 ---- static PyBufferProcs PySID_as_buffer = { ! PySID::getreadbuf, ! 0, ! PySID::getsegcount, ! 0, }; *************** *** 278,282 **** } ! /*static*/ int PySID::getreadbuf(PyObject *self, int index, const void **ptr) { if ( index != 0 ) { --- 278,282 ---- } ! /*static*/ Py_ssize_t PySID::getreadbuf(PyObject *self, Py_ssize_t index, void **ptr) { if ( index != 0 ) { *************** *** 290,294 **** } ! /*static*/ int PySID::getsegcount(PyObject *self, int *lenp) { if ( lenp ) --- 290,294 ---- } ! /*static*/ Py_ssize_t PySID::getsegcount(PyObject *self, Py_ssize_t *lenp) { if ( lenp ) Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** PyWinTypes.h 7 May 2007 03:41:21 -0000 1.38 --- PyWinTypes.h 24 May 2007 06:01:05 -0000 1.39 *************** *** 15,18 **** --- 15,32 ---- #include "windows.h" + // See PEP-353 - this is the "official" test... + #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) + // 2.3 and before have no Py_ssize_t + typedef int Py_ssize_t; + #define PyInt_FromSsize_t PyInt_FromLong + #define PyInt_AsSsize_t PyInt_AsLong + #define PY_SSIZE_T_MAX INT_MAX + #define PY_SSIZE_T_MIN INT_MIN + #endif + + // This only enables runtime checks in debug builds - so we use + // our own so we can enable it always should we desire... + #define PyWin_SAFE_DOWNCAST Py_SAFE_DOWNCAST + // Lars: for WAVEFORMATEX #include "mmsystem.h" *************** *** 144,148 **** PYWINTYPES_EXPORT BOOL PyWinObject_AsWCHAR(PyObject *stringObject, WCHAR **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL); // And free it when finished. ! PYWINTYPES_EXPORT void PyWinObject_FreeWCHAR(BSTR pResult); // Given a PyObject (string, Unicode, etc) create a "char *" with the value --- 158,177 ---- PYWINTYPES_EXPORT BOOL PyWinObject_AsWCHAR(PyObject *stringObject, WCHAR **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL); // And free it when finished. ! PYWINTYPES_EXPORT void PyWinObject_FreeWCHAR(WCHAR *pResult); ! ! // As of Python 2.6, Python switched to 'wchar_t' for unicode. Some old ! // win32 structures that still use 'unsigned short' now fail from C++ with ! // VS8 so we provide a couple of helpers. ! #if PY_VERSION_HEX >= 0x02060000 && _MSC_VER > 1500 ! inline BOOL PyWinObject_AsWCHAR(PyObject *stringObject, unsigned short **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL) ! { ! return PyWinObject_AsWCHAR(stringObject, (WCHAR **)pResult, bNoneOK, pResultLen); ! } ! inline void PyWinObject_FreeWCHAR(unsigned short *pResult) ! { ! PyWinObject_FreeWCHAR((WCHAR *)pResult); ! } ! #endif ! // Given a PyObject (string, Unicode, etc) create a "char *" with the value *************** *** 203,206 **** --- 232,240 ---- PYWINTYPES_EXPORT void PyWinObject_FreeString(WCHAR *str); + // Pointers. + // Substitute for Python's inconsistent PyLong_AsVoidPtr + PYWINTYPES_EXPORT BOOL PyWinLong_AsVoidPtr(PyObject *ob, void **pptr); + PYWINTYPES_EXPORT PyObject *PyWinLong_FromVoidPtr(void *ptr); + /* ** LARGE_INTEGER objects *************** *** 245,248 **** --- 279,298 ---- BOOL PyLong_AsI64(PyObject *val, __int64 *lval); + // A DWORD_PTR and ULONG_PTR appear to mean "integer long enough to hold a pointer" + // It is *not* actually a pointer (but is the same size as a pointer) + inline PyObject *PyWinObject_FromULONG_PTR(ULONG_PTR v) { + return PyLong_FromVoidPtr((void *)v); + } + inline BOOL PyWinLong_AsULONG_PTR(PyObject *ob, ULONG_PTR *r) { + return PyWinLong_AsVoidPtr(ob, (void **)r); + } + + inline PyObject *PyWinObject_FromDWORD_PTR(DWORD_PTR v) { + return PyLong_FromVoidPtr((void *)v); + } + inline BOOL PyWinLong_AsDWORD_PTR(PyObject *ob, DWORD_PTR *r) { + return PyWinLong_AsVoidPtr(ob, (void **)r); + } + // Some boolean helpers for Python 2.2 and earlier #if (PY_VERSION_HEX < 0x02030000 && !defined(PYWIN_NO_BOOL_FROM_LONG)) *************** *** 338,345 **** PYWINTYPES_EXPORT BOOL PyWinObject_AsDWORDArray(PyObject *obdwords, DWORD **pdwords, DWORD *item_cnt, BOOL bNoneOk=TRUE); - // Substitute for Python's inconsistent PyLong_AsVoidPtr - PYWINTYPES_EXPORT BOOL PyWinLong_AsVoidPtr(PyObject *ob, void **pptr); - PYWINTYPES_EXPORT PyObject *PyWinLong_FromVoidPtr(void *ptr); - // Conversion for resource id/name and class atom PYWINTYPES_EXPORT BOOL PyWinObject_AsResourceIdA(PyObject *ob, char **presource_id, BOOL bNoneOK = FALSE); --- 388,391 ---- *************** *** 355,358 **** --- 401,411 ---- // WPARAM and LPARAM conversion PYWINTYPES_EXPORT BOOL PyWinObject_AsPARAM(PyObject *ob, WPARAM *pparam); + inline PyObject *PyWinObject_FromPARAM(WPARAM param) { + return PyWinObject_FromULONG_PTR(param); + } + inline PyObject *PyWinObject_FromPARAM(LPARAM param) { + return PyWinObject_FromULONG_PTR(param); + } + // RECT conversions Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** win32gui.i 7 May 2007 06:00:30 -0000 1.106 --- win32gui.i 24 May 2007 06:01:06 -0000 1.107 *************** *** 755,759 **** } ! BOOL CALLBACK PyDlgProcHDLG(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { BOOL rc = FALSE; --- 755,759 ---- } ! INT_PTR CALLBACK PyDlgProcHDLG(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { BOOL rc = FALSE; *************** *** 1722,1729 **** return NULL; switch (index) { ! // @comm If index is GWL_WNDPROC, then the value parameter // must be a callable object (or a dictionary) to use as the // new window procedure. ! case GWL_WNDPROC: { if (!PyCallable_Check(ob) && !PyDict_Check(ob)) { --- 1722,1729 ---- return NULL; switch (index) { ! // @comm If index is GWLP_WNDPROC, then the value parameter // must be a callable object (or a dictionary) to use as the // new window procedure. ! case GWLP_WNDPROC: { if (!PyCallable_Check(ob) && !PyDict_Check(ob)) { *************** *** 1733,1737 **** PyObject *key = PyWinLong_FromHANDLE(hwnd); ! PyObject *value = Py_BuildValue("ON", ob, PyWinLong_FromVoidPtr((void *)GetWindowLongPtr(hwnd, GWL_WNDPROC))); PyDict_SetItem(g_HWNDMap, key, value); Py_DECREF(value); --- 1733,1737 ---- PyObject *key = PyWinLong_FromHANDLE(hwnd); ! PyObject *value = Py_BuildValue("ON", ob, PyWinLong_FromVoidPtr((void *)GetWindowLongPtr(hwnd, GWLP_WNDPROC))); PyDict_SetItem(g_HWNDMap, key, value); Py_DECREF(value); *************** *** 1852,1856 **** LRESULT rc; ! DWORD dwresult; Py_BEGIN_ALLOW_THREADS rc = SendMessageTimeout(hwnd, msg, wparam, lparam, flags, timeout, &dwresult); --- 1852,1856 ---- LRESULT rc; ! DWORD_PTR dwresult; Py_BEGIN_ALLOW_THREADS rc = SendMessageTimeout(hwnd, msg, wparam, lparam, flags, timeout, &dwresult); *************** *** 1861,1865 **** // If the timeout period expires, a pywintypes.error exception will be thrown, // with zero as the error code. See the Microsoft documentation for more information. ! return Py_BuildValue("Ni", PyWinLong_FromVoidPtr((void *)rc), dwresult); } %} --- 1861,1865 ---- // If the timeout period expires, a pywintypes.error exception will be thrown, // with zero as the error code. See the Microsoft documentation for more information. ! return Py_BuildValue("NN", PyWinLong_FromVoidPtr((void *)rc), PyWinObject_FromDWORD_PTR(dwresult)); } %} *************** *** 4431,4435 **** #ifndef MS_WINCE ! %typemap (python, in) MENUITEMINFO *INPUT (int target_size){ if (0 != PyObject_AsReadBuffer($source, (const void **)&$target, &target_size)) return NULL; --- 4431,4435 ---- #ifndef MS_WINCE ! %typemap (python, in) MENUITEMINFO *INPUT (Py_ssize_t target_size){ if (0 != PyObject_AsReadBuffer($source, (const void **)&$target, &target_size)) return NULL; *************** *** 4438,4442 **** } ! %typemap (python,in) MENUITEMINFO *BOTH(int target_size) { if (0 != PyObject_AsWriteBuffer($source, (void **)&$target, &target_size)) return NULL; --- 4438,4442 ---- } ! %typemap (python,in) MENUITEMINFO *BOTH(Py_ssize_t target_size) { if (0 != PyObject_AsWriteBuffer($source, (void **)&$target, &target_size)) return NULL; *************** *** 4445,4449 **** } ! %typemap (python, in) MENUINFO *INPUT (int target_size){ if (0 != PyObject_AsReadBuffer($source, (const void **)&$target, &target_size)) return NULL; --- 4445,4449 ---- } ! %typemap (python, in) MENUINFO *INPUT (Py_ssize_t target_size){ if (0 != PyObject_AsReadBuffer($source, (const void **)&$target, &target_size)) return NULL; *************** *** 4452,4456 **** } ! %typemap (python,in) MENUINFO *BOTH(int target_size) { if (0 != PyObject_AsWriteBuffer($source, (void **)&$target, &target_size)) return NULL; --- 4452,4456 ---- } ! %typemap (python,in) MENUINFO *BOTH(Py_ssize_t target_size) { if (0 != PyObject_AsWriteBuffer($source, (void **)&$target, &target_size)) return NULL; *************** *** 4557,4561 **** PyObject *obMenu, *obInfo; HMENU hmenu; ! int cbInfo; MENUINFO *pInfo; BOOL result; --- 4557,4561 ---- PyObject *obMenu, *obInfo; HMENU hmenu; ! Py_ssize_t cbInfo; MENUINFO *pInfo; BOOL result; *************** *** 4594,4598 **** PyObject *obMenu, *obInfo; HMENU hmenu; ! int cbInfo; MENUINFO *pInfo; BOOL result; --- 4594,4598 ---- PyObject *obMenu, *obInfo; HMENU hmenu; ! Py_ssize_t cbInfo; MENUINFO *pInfo; BOOL result; Index: win32rasmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32rasmodule.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** win32rasmodule.cpp 1 Oct 2004 00:07:52 -0000 1.8 --- win32rasmodule.cpp 24 May 2007 06:01:06 -0000 1.9 *************** *** 13,17 **** #ifndef WINVER ! #define WINVER 0x400 #endif --- 13,23 ---- #ifndef WINVER ! // hrm - the RASEAPUSERIDENTITY structures on the Vista SDK now want ! // a WINVER > 0x500. ! # ifdef _WIN64 ! # define WINVER 0x501 ! # else ! # define WINVER 0x400 ! # endif #endif Index: win32credmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32credmodule.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32credmodule.cpp 27 Dec 2006 04:41:15 -0000 1.4 --- win32credmodule.cpp 24 May 2007 06:01:06 -0000 1.5 *************** *** 46,50 **** PyObject *obKeyword, *obValue, *args; const void *value; ! int valuelen; BOOL ret; ZeroMemory(attr, sizeof(CREDENTIAL_ATTRIBUTE)); --- 46,50 ---- PyObject *obKeyword, *obValue, *args; const void *value; ! Py_ssize_t valuelen; BOOL ret; ZeroMemory(attr, sizeof(CREDENTIAL_ATTRIBUTE)); *************** *** 380,384 **** // @flag CertCredential|String containing the SHA1 hash of user's certificate case CertCredential:{ ! int hashlen; char *hash; if (PyString_AsStringAndSize(obcredential, &hash, &hashlen)==-1) --- 380,384 ---- // @flag CertCredential|String containing the SHA1 hash of user's certificate case CertCredential:{ ! Py_ssize_t hashlen; char *hash; if (PyString_AsStringAndSize(obcredential, &hash, &hashlen)==-1) Index: PyTime.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyTime.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PyTime.cpp 26 Aug 2006 08:26:37 -0000 1.17 --- PyTime.cpp 24 May 2007 06:01:05 -0000 1.18 *************** *** 60,63 **** --- 60,65 ---- if ( PyNumber_Check(timeOb) ) { + // XXX - should possibly check for long_long, as sizeof(time_t) > sizeof(long) + // on x64 long t = PyInt_AsLong(timeOb); if ( t == -1 ) *************** *** 66,70 **** PyErr_BadArgument(); } else ! result = new PyTime(t); } else if ( PySequence_Check(timeOb) ) --- 68,72 ---- PyErr_BadArgument(); } else ! result = new PyTime((time_t)t); } else if ( PySequence_Check(timeOb) ) *************** *** 129,133 **** PyObject *PyWinTimeObject_FromLong(long t) { ! return new PyTime(t); } --- 131,135 ---- PyObject *PyWinTimeObject_FromLong(long t) { ! return new PyTime((time_t)t); } *************** *** 391,395 **** } ! PyTime::PyTime(long t) { ob_type = &PyTimeType; --- 393,397 ---- } ! PyTime::PyTime(time_t t) { ob_type = &PyTimeType; Index: _winxptheme.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/_winxptheme.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _winxptheme.i 8 Nov 2004 02:57:43 -0000 1.1 --- _winxptheme.i 24 May 2007 06:01:05 -0000 1.2 *************** *** 300,304 **** // @pyswig int|GetThemeAppProperties|Returns the app property flags that control theming ! long GetThemeAppProperties(); // @pyswig |EnableTheming|Enables or disables themeing for the current user --- 300,304 ---- // @pyswig int|GetThemeAppProperties|Returns the app property flags that control theming ! DWORD GetThemeAppProperties(); // @pyswig |EnableTheming|Enables or disables themeing for the current user Index: win32crypt.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32crypt.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32crypt.i 16 Jan 2007 19:04:21 -0000 1.3 --- win32crypt.i 24 May 2007 06:01:06 -0000 1.4 *************** *** 17,21 **** BOOL PyWinObject_AsDATA_BLOB(PyObject *ob, DATA_BLOB *b) { ! return PyObject_AsReadBuffer(ob, (const void **)(&b->pbData), (int *)(&b->cbData))==0; } --- 17,25 ---- BOOL PyWinObject_AsDATA_BLOB(PyObject *ob, DATA_BLOB *b) { ! Py_ssize_t cb; ! if (PyObject_AsReadBuffer(ob, (const void **)(&b->pbData), &cb)!=0) ! return FALSE; ! b->cbData = PyWin_SAFE_DOWNCAST(cb, Py_ssize_t, int); ! return TRUE; } Index: PyLARGE_INTEGER.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyLARGE_INTEGER.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PyLARGE_INTEGER.cpp 28 Jun 2004 03:37:59 -0000 1.10 --- PyLARGE_INTEGER.cpp 24 May 2007 06:01:05 -0000 1.11 *************** *** 200,205 **** PyLongObject *PyLong_Normalize(register PyLongObject *v) { ! int j = ABS(v->ob_size); ! register int i = j; while (i > 0 && v->ob_digit[i-1] == 0) --- 200,205 ---- PyLongObject *PyLong_Normalize(register PyLongObject *v) { ! Py_ssize_t j = ABS(v->ob_size); ! register Py_ssize_t i = j; while (i > 0 && v->ob_digit[i-1] == 0) *************** *** 221,225 **** register PyLongObject *v; __int64 x, prev; ! int i, sign; if (vv == NULL || !PyLong_Check(vv)) { --- 221,225 ---- register PyLongObject *v; __int64 x, prev; ! Py_ssize_t i, sign; if (vv == NULL || !PyLong_Check(vv)) { Index: odbc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/odbc.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** odbc.cpp 24 May 2006 08:40:41 -0000 1.17 --- odbc.cpp 24 May 2007 06:01:05 -0000 1.18 *************** *** 15,23 **** #include <string.h> ! #include <windows.h> #include <sql.h> #include <sqlext.h> - #include <Python.h> #include <import.h> --- 15,22 ---- #include <string.h> ! #include <pywintypes.h> #include <sql.h> #include <sqlext.h> #include <import.h> *************** *** 30,33 **** --- 29,36 ---- #endif + #ifdef _WIN64 + # define mktime _mktime32 + #endif + /* Python 1.5.2 doesn't have PyObject_New PyObject_NEW is not *quite* as safe, but seem to work fine *************** *** 76,81 **** typedef struct _in { struct _in *next; ! long len; ! long sqlBytesAvailable; bool bPutData; char bind_area[1]; --- 79,84 ---- typedef struct _in { struct _in *next; ! SQLLEN len; ! SQLLEN sqlBytesAvailable; bool bPutData; char bind_area[1]; *************** *** 533,537 **** ob->bind_area, vsize, ! &ob->rcode))) { cursorError(cur, "BIND"); --- 536,540 ---- ob->bind_area, vsize, ! (SQLLEN *)&ob->rcode))) { cursorError(cur, "BIND"); *************** *** 641,647 **** } ! static long NTS = SQL_NTS; ! static InputBinding *initInputBinding(cursorObject *cur, int len) { InputBinding *ib = (InputBinding *)malloc(sizeof(InputBinding) + len); --- 644,650 ---- } ! static SQLLEN NTS = SQL_NTS; ! static InputBinding *initInputBinding(cursorObject *cur, Py_ssize_t len) { InputBinding *ib = (InputBinding *)malloc(sizeof(InputBinding) + len); *************** *** 723,727 **** static int ibindNull(cursorObject*cur, int column) { ! static SDWORD nl; /* apparently, ODBC does not read the last parameter until EXEC time, i.e., after this function is --- 726,730 ---- static int ibindNull(cursorObject*cur, int column) { ! static SQLLEN nl; /* apparently, ODBC does not read the last parameter until EXEC time, i.e., after this function is *************** *** 761,765 **** TIMESTAMP_STRUCT *dt = (TIMESTAMP_STRUCT*) ib->bind_area ; ! struct tm *gt = localtime(&val); dt->year = 1900 + gt->tm_year; --- 764,768 ---- TIMESTAMP_STRUCT *dt = (TIMESTAMP_STRUCT*) ib->bind_area ; ! struct tm *gt = localtime((const time_t *)&val); dt->year = 1900 + gt->tm_year; *************** *** 793,797 **** { const char *val = PyString_AsString(item); ! int len = PyObject_Length(item); InputBinding *ib = initInputBinding(cur, len); --- 796,800 ---- { const char *val = PyString_AsString(item); ! Py_ssize_t len = PyObject_Length(item); InputBinding *ib = initInputBinding(cur, len); *************** *** 856,860 **** { const char *val = PyString_AsString(item); ! int len = strlen(val); InputBinding *ib = initInputBinding(cur, len); --- 859,863 ---- { const char *val = PyString_AsString(item); ! size_t len = strlen(val); InputBinding *ib = initInputBinding(cur, len); *************** *** 898,904 **** static int ibindUnicode(cursorObject *cur, int column, PyObject *item) { ! const WCHAR *wval = PyUnicode_AsUnicode(item); ! int nchars = PyUnicode_GetSize(item); ! int nbytes = nchars * sizeof(WCHAR); InputBinding *ib = initInputBinding(cur, nbytes); --- 901,907 ---- static int ibindUnicode(cursorObject *cur, int column, PyObject *item) { ! const WCHAR *wval = (WCHAR *)PyUnicode_AsUnicode(item); ! Py_ssize_t nchars = PyUnicode_GetSize(item); ! Py_ssize_t nbytes = nchars * sizeof(WCHAR); InputBinding *ib = initInputBinding(cur, nbytes); *************** *** 1060,1064 **** { short vtype; ! unsigned long vsize; char name[256]; int pos = 1; --- 1063,1067 ---- { short vtype; ! SQLULEN vsize; char name[256]; int pos = 1; *************** *** 1224,1228 **** rc = SQLPutData(cur->hstmt, pInputBinding->bind_area, 0); } ! for (size_t i = 0; i < putTimes && rc == SQL_SUCCESS; i++) { rc = SQLPutData(cur->hstmt, (void*)(&pInputBinding->bind_area[i * 1024]), 1024); --- 1227,1232 ---- rc = SQLPutData(cur->hstmt, pInputBinding->bind_area, 0); } ! size_t i; ! for (i = 0; i < putTimes && rc == SQL_SUCCESS; i++) { rc = SQLPutData(cur->hstmt, (void*)(&pInputBinding->bind_area[i * 1024]), 1024); *************** *** 1253,1259 **** PyObject *rv = 0; PyObject *rows = 0; ! long t; int n_columns = 0; ! long n_rows = 0; if (attemptReconnect(cur)) --- 1257,1263 ---- PyObject *rv = 0; PyObject *rows = 0; ! SQLLEN t; int n_columns = 0; ! SQLLEN n_rows = 0; if (attemptReconnect(cur)) *************** *** 1404,1408 **** } ! rv = PyInt_FromLong(n_rows); Cleanup: free(sqlbuf); --- 1408,1412 ---- } ! rv = PyInt_FromSsize_t(n_rows); Cleanup: free(sqlbuf); *************** *** 1459,1462 **** --- 1463,1467 ---- /* rc = GetData( ... , bind_area + offset, vsize - offset, &rcode ) */ + SQLLEN rcode; Py_BEGIN_ALLOW_THREADS rc = SQLGetData(cur->hstmt, *************** *** 1465,1469 **** (char *)ob->bind_area + cbRead, ob->vsize - cbRead, ! &ob->rcode); Py_END_ALLOW_THREADS if (unsuccessful(rc)) --- 1470,1475 ---- (char *)ob->bind_area + cbRead, ob->vsize - cbRead, ! &rcode); ! ob->rcode = PyWin_SAFE_DOWNCAST(rcode, SQLLEN, long); Py_END_ALLOW_THREADS if (unsuccessful(rc)) *************** *** 1671,1680 **** char *p; char buf[255]; ! char *firstEqualsSign; ! char *firstSlash; char dsn[MAX_STR]; char uid[MAX_STR]; char pwd[MAX_STR]; ! short connectionStringLength; firstEqualsSign = strchr(c, '='); --- 1677,1686 ---- char *p; char buf[255]; ! const char *firstEqualsSign; ! const char *firstSlash; char dsn[MAX_STR]; char uid[MAX_STR]; char pwd[MAX_STR]; ! size_t connectionStringLength; firstEqualsSign = strchr(c, '='); Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** win32file.i 14 May 2007 17:10:11 -0000 1.79 --- win32file.i 24 May 2007 06:01:06 -0000 1.80 *************** *** 1185,1189 **** Py_END_ALLOW_THREADS PyObject *rc = Py_BuildValue("ilNN", errCode, bytes, ! PyWinLong_FromVoidPtr((void *)key), PyWinObject_FromQueuedOVERLAPPED(pOverlapped)); return rc; --- 1185,1189 ---- Py_END_ALLOW_THREADS PyObject *rc = Py_BuildValue("ilNN", errCode, bytes, ! PyWinObject_FromULONG_PTR(key), PyWinObject_FromQueuedOVERLAPPED(pOverlapped)); return rc; *************** *** 3246,3254 **** if (bSuccess){ obcert_member=PySequence_GetItem(obcert,2); if (PyString_AsStringAndSize(obcert_member, (char **)&((*ppec)->pCertBlob->pbData), ! (int *) &((*ppec)->pCertBlob->cbData))==-1){ PyErr_SetString(PyExc_TypeError,"Third item of ENCRYPTION_CERTIFICATE must be a string containing encoded certificate data"); bSuccess=FALSE; } Py_DECREF(obcert_member); --- 3246,3257 ---- if (bSuccess){ obcert_member=PySequence_GetItem(obcert,2); + Py_ssize_t cbData; if (PyString_AsStringAndSize(obcert_member, (char **)&((*ppec)->pCertBlob->pbData), ! &cbData)==-1){ PyErr_SetString(PyExc_TypeError,"Third item of ENCRYPTION_CERTIFICATE must be a string containing encoded certificate data"); bSuccess=FALSE; + } else { + (*ppec)->pCertBlob->cbData = PyWin_SAFE_DOWNCAST(cbData, Py_ssize_t, DWORD); } Py_DECREF(obcert_member); *************** *** 3322,3330 **** ZeroMemory((*ppech)->pHash,sizeof(EFS_HASH_BLOB)); obhash_item=PySequence_GetItem(obhash,1); if (PyString_AsStringAndSize(obhash_item, (char **)&((*ppech)->pHash->pbData), ! (int *) &((*ppech)->pHash->cbData))==-1){ PyErr_SetString(PyExc_TypeError,"Second item of ENCRYPTION_CERTIFICATE_HASH tuple must be a string containing encoded certificate data"); bSuccess=FALSE; } Py_DECREF(obhash_item); --- 3325,3336 ---- ZeroMemory((*ppech)->pHash,sizeof(EFS_HASH_BLOB)); obhash_item=PySequence_GetItem(obhash,1); + Py_ssize_t cbData; if (PyString_AsStringAndSize(obhash_item, (char **)&((*ppech)->pHash->pbData), ! &cbData)==-1){ PyErr_SetString(PyExc_TypeError,"Second item of ENCRYPTION_CERTIFICATE_HASH tuple must be a string containing encoded certificate data"); bSuccess=FALSE; + } else { + (*ppech)->pHash->cbData = PyWin_SAFE_DOWNCAST(cbData, Py_ssize_t, DWORD); } Py_DECREF(obhash_item); *************** *** 3527,3531 **** HANDLE h; BYTE *buf; ! int buflen; DWORD bytes_requested, bytes_read; BOOL bAbort,bProcessSecurity; --- 3533,3537 ---- HANDLE h; BYTE *buf; ! Py_ssize_t buflen; DWORD bytes_requested, bytes_read; BOOL bAbort,bProcessSecurity; *************** *** 3616,3620 **** HANDLE h; BYTE *buf; ! int buflen; DWORD bytes_to_write, bytes_written; BOOL bAbort, bProcessSecurity; --- 3622,3626 ---- HANDLE h; BYTE *buf; ! Py_ssize_t buflen; DWORD bytes_to_write, bytes_written; BOOL bAbort, bProcessSecurity; Index: win32clipboardmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32clipboardmodule.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** win32clipboardmodule.cpp 16 Jan 2007 16:55:51 -0000 1.16 --- win32clipboardmodule.cpp 24 May 2007 06:01:05 -0000 1.17 *************** *** 903,907 **** // to the new memory. const void * buf = NULL; ! int bufSize = 0; if (PyObject_AsReadBuffer(obhandle,&buf,&bufSize)==-1) --- 903,907 ---- // to the new memory. const void * buf = NULL; ! Py_ssize_t bufSize = 0; if (PyObject_AsReadBuffer(obhandle,&buf,&bufSize)==-1) Index: PyACL.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyACL.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PyACL.cpp 29 Jul 2005 01:33:08 -0000 1.15 --- PyACL.cpp 24 May 2007 06:01:05 -0000 1.16 *************** *** 987,991 **** PyACL *This = (PyACL *)self; PyObject *obexpl=NULL, *obexpl_list=NULL; ! unsigned long expl_cnt=0, expl_ind=0; DWORD err; if (!PyArg_ParseTuple(args, "O:SetEntriesInAcl", &obexpl_list)) --- 987,991 ---- PyACL *This = (PyACL *)self; PyObject *obexpl=NULL, *obexpl_list=NULL; ! Py_ssize_t expl_cnt=0, expl_ind=0; DWORD err; if (!PyArg_ParseTuple(args, "O:SetEntriesInAcl", &obexpl_list)) *************** *** 996,1000 **** } expl_cnt=PySequence_Length(obexpl_list); ! DWORD bytes_allocated=expl_cnt*sizeof(EXPLICIT_ACCESS_W); pexpl_start = (PEXPLICIT_ACCESS_W)malloc(bytes_allocated); ZeroMemory(pexpl_start,bytes_allocated); --- 996,1000 ---- } expl_cnt=PySequence_Length(obexpl_list); ! Py_ssize_t bytes_allocated=expl_cnt*sizeof(EXPLICIT_ACCESS_W); pexpl_start = (PEXPLICIT_ACCESS_W)malloc(bytes_allocated); ZeroMemory(pexpl_start,bytes_allocated); *************** *** 1013,1017 **** pexpl++; } ! err = ::SetEntriesInAclW(expl_cnt,pexpl_start,This->GetACL(),&new_acl); if (err!=ERROR_SUCCESS){ PyWin_SetAPIError("SetEntriesInAcl",err); --- 1013,1018 ---- pexpl++; } ! err = ::SetEntriesInAclW(PyWin_SAFE_DOWNCAST(expl_cnt, Py_ssize_t, ULONG), ! pexpl_start,This->GetACL(),&new_acl); if (err!=ERROR_SUCCESS){ PyWin_SetAPIError("SetEntriesInAcl",err); Index: PyIID.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyIID.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PyIID.cpp 26 May 2004 08:31:44 -0000 1.7 --- PyIID.cpp 24 May 2007 06:01:05 -0000 1.8 *************** *** 22,26 **** if (isBytes) { const void *buf; ! int cb; if (!PyObject_CheckReadBuffer(obIID)) return PyErr_Format(PyExc_TypeError, "object must be a read-buffer to read the CLSID bytes"); --- 22,26 ---- if (isBytes) { const void *buf; ! Py_ssize_t cb; if (!PyObject_CheckReadBuffer(obIID)) return PyErr_Format(PyExc_TypeError, "object must be a read-buffer to read the CLSID bytes"); *************** *** 131,135 **** } ! static int getreadbuf(PyObject *self, int index, const void **ptr) { if ( index != 0 ) { --- 131,135 ---- } ! static Py_ssize_t getreadbuf(PyObject *self, Py_ssize_t index, void **ptr) { if ( index != 0 ) { *************** *** 143,147 **** } ! static int getsegcount(PyObject *self, int *lenp) { if ( lenp ) --- 143,147 ---- } ! static Py_ssize_t getsegcount(PyObject *self, Py_ssize_t *lenp) { if ( lenp ) *************** *** 151,158 **** static PyBufferProcs PyIID_as_buffer = { ! (getreadbufferproc)getreadbuf, ! (getwritebufferproc)0, ! (getsegcountproc)getsegcount, ! (getcharbufferproc)0, }; --- 151,158 ---- static PyBufferProcs PyIID_as_buffer = { ! getreadbuf, ! 0, ! getsegcount, ! 0, }; Index: dbi.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/dbi.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dbi.cpp 7 Oct 2004 03:41:49 -0000 1.8 --- dbi.cpp 24 May 2007 06:01:05 -0000 1.9 *************** *** 26,29 **** --- 26,33 ---- #include "dbi.h" + #ifdef _WIN64 + # define ctime _ctime32 + #endif + typedef struct { Index: PyDEVMODE.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyDEVMODE.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyDEVMODE.cpp 13 May 2006 12:16:39 -0000 1.5 --- PyDEVMODE.cpp 24 May 2007 06:01:05 -0000 1.6 *************** *** 278,282 **** { char *name, *value; ! int valuelen; name=PyString_AsString(obname); if (name==NULL) --- 278,282 ---- { char *name, *value; ! Py_ssize_t valuelen; name=PyString_AsString(obname); if (name==NULL) |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:07
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/win32/src/win32net Modified Files: win32net.h win32netfile.cpp win32netmodule.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: win32netmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmodule.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** win32netmodule.cpp 12 Sep 2006 08:22:29 -0000 1.23 --- win32netmodule.cpp 24 May 2007 06:01:06 -0000 1.24 *************** *** 279,291 **** DWORD level; BOOL ok = FALSE; ! DWORD resumeHandle = 0; DWORD numRead, i; ! PyObject *list; BYTE *buf = NULL; DWORD totalEntries = 0; ! if (!PyArg_ParseTuple(args, "Oi|ii", &obServer, &level, &resumeHandle, &dwPrefLen)) return NULL; if (!PyWinObject_AsWCHAR(obServer, &szServer, TRUE)) goto done; if (!FindNET_STRUCT(level, pInfos, &pInfo)) --- 279,293 ---- DWORD level; BOOL ok = FALSE; ! DWORD_PTR resumeHandle = 0; DWORD numRead, i; ! PyObject *list, *obResumeHandle = Py_None; BYTE *buf = NULL; DWORD totalEntries = 0; ! if (!PyArg_ParseTuple(args, "Oi|Oi", &obServer, &level, &obResumeHandle, &dwPrefLen)) return NULL; if (!PyWinObject_AsWCHAR(obServer, &szServer, TRUE)) goto done; + if (obResumeHandle != Py_None && !PyWinLong_AsDWORD_PTR(obResumeHandle, &resumeHandle)) + goto done; if (!FindNET_STRUCT(level, pInfos, &pInfo)) *************** *** 313,317 **** } resumeHandle = err==0 ? 0 : resumeHandle; ! ret = Py_BuildValue("Oll", list, totalEntries, resumeHandle); Py_DECREF(list); ok = TRUE; --- 315,319 ---- } resumeHandle = err==0 ? 0 : resumeHandle; ! ret = Py_BuildValue("OlN", list, totalEntries, PyWinObject_FromDWORD_PTR(resumeHandle)); Py_DECREF(list); ok = TRUE; *************** *** 336,345 **** DWORD level; BOOL ok = FALSE; ! DWORD resumeHandle = 0; DWORD numRead, i; PyObject *list; BYTE *buf = NULL; DWORD totalEntries = 0; ! if (!PyArg_ParseTuple(args, "OOi|ii", &obServer, &obGroup, &level, &resumeHandle, &dwPrefLen)) return NULL; if (!PyWinObject_AsWCHAR(obServer, &szServer, TRUE)) --- 338,348 ---- DWORD level; BOOL ok = FALSE; ! DWORD_PTR resumeHandle = 0; ! PyObject *obResumeHandle = Py_None; DWORD numRead, i; PyObject *list; BYTE *buf = NULL; DWORD totalEntries = 0; ! if (!PyArg_ParseTuple(args, "OOi|Oi", &obServer, &obGroup, &level, &obResumeHandle, &dwPrefLen)) return NULL; if (!PyWinObject_AsWCHAR(obServer, &szServer, TRUE)) *************** *** 349,352 **** --- 352,358 ---- goto done; + if (obResumeHandle != Py_None && !PyWinLong_AsDWORD_PTR(obResumeHandle, &resumeHandle)) + goto done; + if (!FindNET_STRUCT(level, pInfos, &pInfo)) goto done; *************** *** 367,371 **** } resumeHandle = err==0 ? 0 : resumeHandle; ! ret = Py_BuildValue("Oll", list, totalEntries, resumeHandle); Py_DECREF(list); ok = TRUE; --- 373,377 ---- } resumeHandle = err==0 ? 0 : resumeHandle; ! ret = Py_BuildValue("OlN", list, totalEntries, PyWinObject_FromDWORD_PTR(resumeHandle)); Py_DECREF(list); ok = TRUE; Index: win32netfile.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netfile.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32netfile.cpp 29 Aug 2005 09:51:45 -0000 1.5 --- win32netfile.cpp 24 May 2007 06:01:06 -0000 1.6 *************** *** 38,42 **** DWORD dwEntriesRead= 0; DWORD dwTotalEntries = 0; ! DWORD dwResumeHandle = 0; DWORD i; --- 38,42 ---- DWORD dwEntriesRead= 0; DWORD dwTotalEntries = 0; ! DWORD_PTR resumeHandle; DWORD i; *************** *** 65,69 **** Py_BEGIN_ALLOW_THREADS nStatus = NetFileEnum(server_name, base_path, user_name, info_lvl, ! (LPBYTE*)&pBuf2, buff_len, &dwEntriesRead, &dwTotalEntries, &dwResumeHandle); Py_END_ALLOW_THREADS --- 65,69 ---- Py_BEGIN_ALLOW_THREADS nStatus = NetFileEnum(server_name, base_path, user_name, info_lvl, ! (LPBYTE*)&pBuf2, buff_len, &dwEntriesRead, &dwTotalEntries, &resumeHandle); Py_END_ALLOW_THREADS *************** *** 98,102 **** nStatus = NetFileEnum(server_name, base_path, user_name, info_lvl, (LPBYTE*)&pBuf3, buff_len, &dwEntriesRead, ! &dwTotalEntries, &dwResumeHandle); Py_END_ALLOW_THREADS --- 98,102 ---- nStatus = NetFileEnum(server_name, base_path, user_name, info_lvl, (LPBYTE*)&pBuf3, buff_len, &dwEntriesRead, ! &dwTotalEntries, &resumeHandle); Py_END_ALLOW_THREADS Index: win32net.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32net.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32net.h 29 Jul 2005 01:33:08 -0000 1.5 --- win32net.h 24 May 2007 06:01:06 -0000 1.6 *************** *** 32,39 **** // Helpers functions that take a function pointer ! typedef DWORD (__stdcall *PFNSIMPLEENUM)(LPCWSTR, DWORD, LPBYTE *, DWORD, LPDWORD, LPDWORD, LPDWORD ); PyObject *PyDoSimpleEnum(PyObject *self, PyObject *args, PFNSIMPLEENUM pfn, char *fnname, PyNET_STRUCT *pInfos); ! typedef DWORD (__stdcall *PFNNAMEDENUM)(LPCWSTR, LPCWSTR, DWORD, LPBYTE *, DWORD, LPDWORD, LPDWORD, LPDWORD ); PyObject *PyDoNamedEnum(PyObject *self, PyObject *args, PFNNAMEDENUM pfn, char *fnname, PyNET_STRUCT *pInfos); --- 32,39 ---- // Helpers functions that take a function pointer ! typedef DWORD (__stdcall *PFNSIMPLEENUM)(LPCWSTR, DWORD, LPBYTE *, DWORD, LPDWORD, LPDWORD, PDWORD_PTR ); PyObject *PyDoSimpleEnum(PyObject *self, PyObject *args, PFNSIMPLEENUM pfn, char *fnname, PyNET_STRUCT *pInfos); ! typedef DWORD (__stdcall *PFNNAMEDENUM)(LPCWSTR, LPCWSTR, DWORD, LPBYTE *, DWORD, LPDWORD, LPDWORD, PDWORD_PTR); PyObject *PyDoNamedEnum(PyObject *self, PyObject *args, PFNNAMEDENUM pfn, char *fnname, PyNET_STRUCT *pInfos); |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:07
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/win32/test Modified Files: test_clipboard.py Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: test_clipboard.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_clipboard.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_clipboard.py 1 Dec 2003 10:57:53 -0000 1.4 --- test_clipboard.py 24 May 2007 06:01:06 -0000 1.5 *************** *** 80,83 **** --- 80,86 ---- self.failUnlessEqual(val + '\0', raw_data) def test_bad_mem(self): + if sys.getwindowsversion()[0] > 5: + print "skipping test_bad_mem - fails on Vista (x64 at least - not sure about x32...)" + return self.failUnlessRaises(pywintypes.error, GetGlobalMemory, 0) self.failUnlessRaises(pywintypes.error, GetGlobalMemory, 1) |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:07
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32print In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/win32/src/win32print Modified Files: win32print.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: win32print.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32print/win32print.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** win32print.cpp 14 Mar 2007 04:29:35 -0000 1.24 --- win32print.cpp 24 May 2007 06:01:06 -0000 1.25 *************** *** 2417,2421 **** PyObject *obbuf; void *buf; ! DWORD bufsize, bytes_written=0, sleep_ms; if (!PyArg_ParseTuple(args, "O&Ok", PyWinObject_AsPrinterHANDLE, &hprinter, // @pyparm <o PyPrinterHANDLE>|Printer||Handle to a printer --- 2417,2422 ---- PyObject *obbuf; void *buf; ! Py_ssize_t bufsize; ! DWORD bytes_written=0, sleep_ms; if (!PyArg_ParseTuple(args, "O&Ok", PyWinObject_AsPrinterHANDLE, &hprinter, // @pyparm <o PyPrinterHANDLE>|Printer||Handle to a printer *************** *** 2423,2429 **** &sleep_ms)) // @pyparm int|Sleep||Number of milliseconds to suspend printer return NULL; ! if (PyString_AsStringAndSize(obbuf, (char **)&buf, (int *)&bufsize)==-1) return NULL; ! if (!(*pfnFlushPrinter)(hprinter, buf, bufsize, &bytes_written, sleep_ms)) return PyWin_SetAPIError("FlushPrinter"); return PyLong_FromUnsignedLong(bytes_written); --- 2424,2432 ---- &sleep_ms)) // @pyparm int|Sleep||Number of milliseconds to suspend printer return NULL; ! if (PyString_AsStringAndSize(obbuf, (char **)&buf, &bufsize)==-1) return NULL; ! if (!(*pfnFlushPrinter)(hprinter, buf, ! PyWin_SAFE_DOWNCAST(bufsize, Py_ssize_t, DWORD), ! &bytes_written, sleep_ms)) return PyWin_SetAPIError("FlushPrinter"); return PyLong_FromUnsignedLong(bytes_written); |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:06
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/internet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32comext/internet/src Modified Files: PyIInternetProtocol.cpp PyIInternetProtocol.h PyIInternetProtocolRoot.cpp PyIInternetProtocolRoot.h Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyIInternetProtocolRoot.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/internet/src/PyIInternetProtocolRoot.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIInternetProtocolRoot.h 1 Sep 1999 23:15:28 -0000 1.1 --- PyIInternetProtocolRoot.h 24 May 2007 06:01:05 -0000 1.2 *************** *** 40,44 **** IInternetBindInfo __RPC_FAR * pOIBindInfo, DWORD grfPI, ! DWORD dwReserved); STDMETHOD(Continue)( --- 40,44 ---- IInternetBindInfo __RPC_FAR * pOIBindInfo, DWORD grfPI, ! HANDLE_PTR dwReserved); STDMETHOD(Continue)( Index: PyIInternetProtocolRoot.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/internet/src/PyIInternetProtocolRoot.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIInternetProtocolRoot.cpp 26 Nov 1999 14:15:31 -0000 1.2 --- PyIInternetProtocolRoot.cpp 24 May 2007 06:01:05 -0000 1.3 *************** *** 206,210 **** /* [in] */ IInternetBindInfo __RPC_FAR * pOIBindInfo, /* [in] */ DWORD grfPI, ! /* [in] */ DWORD dwReserved) { PY_GATEWAY_METHOD; --- 206,210 ---- /* [in] */ IInternetBindInfo __RPC_FAR * pOIBindInfo, /* [in] */ DWORD grfPI, ! /* [in] */ HANDLE_PTR dwReserved) { PY_GATEWAY_METHOD; *************** *** 215,219 **** obpOIProtSink = PyCom_PyObjectFromIUnknown(pOIProtSink, IID_IInternetProtocolSink, TRUE); obpOIBindInfo = PyCom_PyObjectFromIUnknown(pOIBindInfo, IID_IInternetBindInfo, TRUE); ! HRESULT hr=InvokeViaPolicy("Start", NULL, "OOOii", obszUrl, obpOIProtSink, obpOIBindInfo, grfPI, dwReserved); Py_XDECREF(obszUrl); Py_XDECREF(obpOIProtSink); --- 215,219 ---- obpOIProtSink = PyCom_PyObjectFromIUnknown(pOIProtSink, IID_IInternetProtocolSink, TRUE); obpOIBindInfo = PyCom_PyObjectFromIUnknown(pOIBindInfo, IID_IInternetBindInfo, TRUE); ! HRESULT hr=InvokeViaPolicy("Start", NULL, "OOOiN", obszUrl, obpOIProtSink, obpOIBindInfo, grfPI, PyLong_FromVoidPtr((void *)dwReserved)); Py_XDECREF(obszUrl); Py_XDECREF(obpOIProtSink); Index: PyIInternetProtocol.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/internet/src/PyIInternetProtocol.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIInternetProtocol.h 1 Sep 1999 23:15:28 -0000 1.1 --- PyIInternetProtocol.h 24 May 2007 06:01:05 -0000 1.2 *************** *** 38,42 **** IInternetBindInfo __RPC_FAR * pOIBindInfo, DWORD grfPI, ! DWORD dwReserved); STDMETHOD(Continue)( --- 38,42 ---- IInternetBindInfo __RPC_FAR * pOIBindInfo, DWORD grfPI, ! HANDLE_PTR dwReserved); STDMETHOD(Continue)( Index: PyIInternetProtocol.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/internet/src/PyIInternetProtocol.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIInternetProtocol.cpp 1 Sep 1999 23:15:28 -0000 1.1 --- PyIInternetProtocol.cpp 24 May 2007 06:01:05 -0000 1.2 *************** *** 147,151 **** // Std delegation ! STDMETHODIMP PyGInternetProtocol::Start(LPCWSTR szUrl, IInternetProtocolSink __RPC_FAR * pOIProtSink, IInternetBindInfo __RPC_FAR * pOIBindInfo, DWORD grfPI, DWORD dwReserved) { return PyGInternetProtocolRoot::Start(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved);} --- 147,151 ---- // Std delegation ! STDMETHODIMP PyGInternetProtocol::Start(LPCWSTR szUrl, IInternetProtocolSink __RPC_FAR * pOIProtSink, IInternetBindInfo __RPC_FAR * pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) { return PyGInternetProtocolRoot::Start(szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved);} |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:06
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32comext/axscript/src Modified Files: AXScript.h PyGActiveScriptParse.cpp PyIActiveScriptParseProcedure.cpp PyIActiveScriptParseProcedure.h Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyIActiveScriptParseProcedure.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/src/PyIActiveScriptParseProcedure.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIActiveScriptParseProcedure.cpp 25 Jan 2005 13:34:07 -0000 1.3 --- PyIActiveScriptParseProcedure.cpp 24 May 2007 06:01:05 -0000 1.4 *************** *** 107,111 **** /* [in] */ IUnknown __RPC_FAR * punkContext, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, --- 107,111 ---- /* [in] */ IUnknown __RPC_FAR * punkContext, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD_PTR dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, *************** *** 126,131 **** obpunkContext = PyCom_PyObjectFromIUnknown(punkContext, IID_IUnknown, TRUE); obpstrDelimiter = PyWinObject_FromOLECHAR(pstrDelimiter); PyObject *result; ! HRESULT hr=InvokeViaPolicy("ParseProcedureText", &result, "OOOOOOiii", obpstrCode, obpstrFormalParams, obpstrProcedureName, obpstrItemName, obpunkContext, obpstrDelimiter, dwSourceContextCookie, ulStartingLineNumber, dwFlags); Py_XDECREF(obpstrCode); Py_XDECREF(obpstrFormalParams); --- 126,132 ---- obpunkContext = PyCom_PyObjectFromIUnknown(punkContext, IID_IUnknown, TRUE); obpstrDelimiter = PyWinObject_FromOLECHAR(pstrDelimiter); + PyObject *obContext = PyWinObject_FromDWORD_PTR(dwSourceContextCookie); PyObject *result; ! HRESULT hr=InvokeViaPolicy("ParseProcedureText", &result, "OOOOOOOii", obpstrCode, obpstrFormalParams, obpstrProcedureName, obpstrItemName, obpunkContext, obpstrDelimiter, obContext, ulStartingLineNumber, dwFlags); Py_XDECREF(obpstrCode); Py_XDECREF(obpstrFormalParams); *************** *** 134,137 **** --- 135,139 ---- Py_XDECREF(obpunkContext); Py_XDECREF(obpstrDelimiter); + Py_XDECREF(obContext); if (FAILED(hr)) return hr; // Process the Python results, and convert back to the real params Index: AXScript.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/src/AXScript.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AXScript.h 1 Sep 1999 23:12:45 -0000 1.1 --- AXScript.h 24 May 2007 06:01:05 -0000 1.2 *************** *** 197,201 **** /* [in] */ LPCOLESTR pstrEventName, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, --- 197,201 ---- /* [in] */ LPCOLESTR pstrEventName, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD_PTR dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, *************** *** 208,212 **** /* [in] */ IUnknown __RPC_FAR *punkContext, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, --- 208,212 ---- /* [in] */ IUnknown __RPC_FAR *punkContext, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD_PTR dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, Index: PyIActiveScriptParseProcedure.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/src/PyIActiveScriptParseProcedure.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIActiveScriptParseProcedure.h 1 Sep 1999 23:12:46 -0000 1.1 --- PyIActiveScriptParseProcedure.h 24 May 2007 06:01:05 -0000 1.2 *************** *** 37,41 **** IUnknown __RPC_FAR * punkContext, LPCOLESTR pstrDelimiter, ! DWORD dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, --- 37,41 ---- IUnknown __RPC_FAR * punkContext, LPCOLESTR pstrDelimiter, ! DWORD_PTR dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, Index: PyGActiveScriptParse.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/src/PyGActiveScriptParse.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyGActiveScriptParse.cpp 5 Nov 2003 22:05:25 -0000 1.4 --- PyGActiveScriptParse.cpp 24 May 2007 06:01:05 -0000 1.5 *************** *** 25,29 **** /* [in] */ LPCOLESTR pstrEventName, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, --- 25,29 ---- /* [in] */ LPCOLESTR pstrEventName, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD_PTR dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, *************** *** 38,44 **** PyObject *obEventName = PyWinObject_FromOLECHAR(pstrEventName); PyObject *obDelimiter = PyWinObject_FromOLECHAR(pstrDelimiter); PyObject *result; HRESULT hr = InvokeGatewayViaPolicy(this, "AddScriptlet", pexcepinfo, &result, ! "NNNNNNii", obDefaultName, obCode, --- 38,45 ---- PyObject *obEventName = PyWinObject_FromOLECHAR(pstrEventName); PyObject *obDelimiter = PyWinObject_FromOLECHAR(pstrDelimiter); + PyObject *obContext = PyWinObject_FromDWORD_PTR(dwSourceContextCookie); PyObject *result; HRESULT hr = InvokeGatewayViaPolicy(this, "AddScriptlet", pexcepinfo, &result, ! "NNNNNNNi", obDefaultName, obCode, *************** *** 47,51 **** obEventName, obDelimiter, ! dwSourceContextCookie, ulStartingLineNumber); if (FAILED(hr)) return hr; --- 48,52 ---- obEventName, obDelimiter, ! obContext, ulStartingLineNumber); if (FAILED(hr)) return hr; *************** *** 60,64 **** /* [in] */ IUnknown __RPC_FAR *punkContext, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, --- 61,65 ---- /* [in] */ IUnknown __RPC_FAR *punkContext, /* [in] */ LPCOLESTR pstrDelimiter, ! /* [in] */ DWORD_PTR dwSourceContextCookie, /* [in] */ ULONG ulStartingLineNumber, /* [in] */ DWORD dwFlags, *************** *** 77,88 **** PyObject *obItemName = PyWinObject_FromOLECHAR(pstrItemName); PyObject *obDelimiter = PyWinObject_FromOLECHAR(pstrDelimiter); ! HRESULT hr = InvokeGatewayViaPolicy(this, "ParseScriptText", pexcepinfo, &result, ! "NNONiiii", obCode, obItemName, context, obDelimiter, ! dwSourceContextCookie, ulStartingLineNumber, dwFlags, --- 78,89 ---- PyObject *obItemName = PyWinObject_FromOLECHAR(pstrItemName); PyObject *obDelimiter = PyWinObject_FromOLECHAR(pstrDelimiter); ! PyObject *obContext = PyWinObject_FromDWORD_PTR(dwSourceContextCookie); HRESULT hr = InvokeGatewayViaPolicy(this, "ParseScriptText", pexcepinfo, &result, ! "NNONNiii", obCode, obItemName, context, obDelimiter, ! obContext, ulStartingLineNumber, dwFlags, |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:06
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32comext/shell/src Modified Files: PyIContextMenu.cpp PyIContextMenu.h PyIShellFolder.cpp PyIShellFolder.h shell.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyIContextMenu.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIContextMenu.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIContextMenu.h 6 Oct 2003 12:47:57 -0000 1.1 --- PyIContextMenu.h 24 May 2007 06:01:05 -0000 1.2 *************** *** 45,49 **** STDMETHOD(GetCommandString)( ! UINT idCmd, UINT uType, UINT __RPC_FAR * pwReserved, --- 45,49 ---- STDMETHOD(GetCommandString)( ! UINT_PTR idCmd, UINT uType, UINT __RPC_FAR * pwReserved, Index: PyIContextMenu.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIContextMenu.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIContextMenu.cpp 21 Jan 2007 11:40:40 -0000 1.4 --- PyIContextMenu.cpp 24 May 2007 06:01:05 -0000 1.5 *************** *** 162,166 **** STDMETHODIMP PyGContextMenu::GetCommandString( ! /* [unique][in] */ UINT idCmd, /* [unique][in] */ UINT uFlags, /* [unique][in] */ UINT * pwReserved, --- 162,166 ---- STDMETHODIMP PyGContextMenu::GetCommandString( ! /* [unique][in] */ UINT_PTR idCmd, /* [unique][in] */ UINT uFlags, /* [unique][in] */ UINT * pwReserved, *************** *** 170,174 **** PyObject *result; PY_GATEWAY_METHOD; ! HRESULT hr=InvokeViaPolicy("GetCommandString", &result, "II", idCmd, uFlags); if (FAILED(hr)) return hr; --- 170,174 ---- PyObject *result; PY_GATEWAY_METHOD; ! HRESULT hr=InvokeViaPolicy("GetCommandString", &result, "NI", PyWinObject_FromULONG_PTR(idCmd), uFlags); if (FAILED(hr)) return hr; Index: PyIShellFolder.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellFolder.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIShellFolder.h 2 Nov 2003 09:58:32 -0000 1.3 --- PyIShellFolder.h 24 May 2007 06:01:05 -0000 1.4 *************** *** 67,73 **** STDMETHOD(CompareIDs)( ! long lparam, ! const ITEMIDLIST __RPC_FAR * pidl1, ! const ITEMIDLIST __RPC_FAR * pidl2); STDMETHOD(CreateViewObject)( --- 67,73 ---- STDMETHOD(CompareIDs)( ! LPARAM lparam, ! LPCITEMIDLIST pidl1, ! LPCITEMIDLIST pidl2); STDMETHOD(CreateViewObject)( *************** *** 90,95 **** STDMETHOD(GetDisplayNameOf)( ! const ITEMIDLIST __RPC_FAR * pidl, ! DWORD uFlags, STRRET __RPC_FAR * out); --- 90,95 ---- STDMETHOD(GetDisplayNameOf)( ! LPCITEMIDLIST pidl, ! SHGDNF uFlags, STRRET __RPC_FAR * out); Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** shell.cpp 25 Apr 2007 03:24:40 -0000 1.52 --- shell.cpp 24 May 2007 06:01:05 -0000 1.53 *************** *** 171,175 **** // @object PyIDL|A Python representation of an IDL. Implemented as list of Python strings. ! BOOL PyObject_AsPIDL(PyObject *ob, ITEMIDLIST **ppidl, BOOL bNoneOK /*= FALSE*/, UINT *pcb /* = NULL */) { if (ob==Py_None) { --- 171,175 ---- // @object PyIDL|A Python representation of an IDL. Implemented as list of Python strings. ! BOOL PyObject_AsPIDL(PyObject *ob, LPITEMIDLIST *ppidl, BOOL bNoneOK /*= FALSE*/, UINT *pcb /* = NULL */) { if (ob==Py_None) { *************** *** 2136,2142 **** --- 2136,2148 ---- } if (obhIcon) { + // SEE_MASK_ICON is defined around 'if (NTDDI_VERSION < NTDDI_LONGHORN)' and commented as 'not used' + #ifndef SEE_MASK_ICON + PyErr_SetString(PyExc_NotImplementedError, "SEE_MASK_ICON not declared on this platform"); + goto done; + #else p->fMask |= SEE_MASK_ICON; if (!PyWinObject_AsHANDLE(obhIcon, &p->hIcon)) goto done; + #endif } if (obhMonitor) { Index: PyIShellFolder.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellFolder.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PyIShellFolder.cpp 8 Mar 2007 23:38:59 -0000 1.14 --- PyIShellFolder.cpp 24 May 2007 06:01:05 -0000 1.15 *************** *** 551,567 **** STDMETHODIMP PyGShellFolder::CompareIDs( ! /* [unique][in] */ long lparam, ! /* [unique][in] */ const ITEMIDLIST __RPC_FAR * pidl1, ! /* [unique][in] */ const ITEMIDLIST __RPC_FAR * pidl2) { PY_GATEWAY_METHOD; ! PyObject *obpidl1; ! PyObject *obpidl2; ! obpidl1 = PyObject_FromPIDL(pidl1, FALSE); ! obpidl2 = PyObject_FromPIDL(pidl2, FALSE); PyObject *result; ! HRESULT hr=InvokeViaPolicy("CompareIDs", &result, "lOO", lparam, obpidl1, obpidl2); ! Py_XDECREF(obpidl1); ! Py_XDECREF(obpidl2); if (FAILED(hr)) return hr; if (PyInt_Check(result)) --- 551,564 ---- STDMETHODIMP PyGShellFolder::CompareIDs( ! /* [unique][in] */ LPARAM lparam, ! /* [unique][in] */ LPCITEMIDLIST pidl1, ! /* [unique][in] */ LPCITEMIDLIST pidl2) { PY_GATEWAY_METHOD; ! PyObject *obparam = PyWinObject_FromPARAM(lparam); ! PyObject *obpidl1 = PyObject_FromPIDL(pidl1, FALSE); ! PyObject *obpidl2 = PyObject_FromPIDL(pidl2, FALSE); PyObject *result; ! HRESULT hr=InvokeViaPolicy("CompareIDs", &result, "NNN", obparam, obpidl1, obpidl2); if (FAILED(hr)) return hr; if (PyInt_Check(result)) *************** *** 644,649 **** STDMETHODIMP PyGShellFolder::GetDisplayNameOf( ! /* [unique][in] */ const ITEMIDLIST __RPC_FAR * pidl, ! /* [unique][in] */ DWORD uFlags, /* [out] */ STRRET __RPC_FAR * out) { --- 641,646 ---- STDMETHODIMP PyGShellFolder::GetDisplayNameOf( ! /* [unique][in] */ LPCITEMIDLIST pidl, ! /* [unique][in] */ SHGDNF uFlags, /* [out] */ STRRET __RPC_FAR * out) { |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:05
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32comext/axcontrol/src Modified Files: PyIViewObject.cpp PyIViewObject.h PyIViewObject2.cpp PyIViewObject2.h Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyIViewObject.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src/PyIViewObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIViewObject.h 1 Sep 1999 23:05:45 -0000 1.1 --- PyIViewObject.h 24 May 2007 06:01:04 -0000 1.2 *************** *** 35,39 **** - // IViewObject STDMETHOD(Draw)( --- 35,38 ---- *************** *** 46,51 **** LPCRECTL lprcBounds, LPCRECTL lprcWBounds, ! BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( DWORD ), ! DWORD dwContinue); STDMETHOD(GetColorSet)( --- 45,50 ---- LPCRECTL lprcBounds, LPCRECTL lprcWBounds, ! BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( ULONG_PTR ), ! ULONG_PTR dwContinue); STDMETHOD(GetColorSet)( Index: PyIViewObject2.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src/PyIViewObject2.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIViewObject2.h 1 Sep 1999 23:05:45 -0000 1.1 --- PyIViewObject2.h 24 May 2007 06:01:04 -0000 1.2 *************** *** 39,44 **** LPCRECTL lprcBounds, LPCRECTL lprcWBounds, ! BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( DWORD ), ! DWORD dwContinue); STDMETHOD(GetColorSet)( --- 39,44 ---- LPCRECTL lprcBounds, LPCRECTL lprcWBounds, ! BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( ULONG_PTR ), ! ULONG_PTR dwContinue); STDMETHOD(GetColorSet)( Index: PyIViewObject2.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src/PyIViewObject2.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIViewObject2.cpp 1 Sep 1999 23:05:45 -0000 1.1 --- PyIViewObject2.cpp 24 May 2007 06:01:04 -0000 1.2 *************** *** 81,86 **** LPCRECTL lprcBounds, LPCRECTL lprcWBounds, ! BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( DWORD ), ! DWORD dwContinue) { return PyGViewObject::Draw(dwDrawAspect, lindex, pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue); } --- 81,86 ---- LPCRECTL lprcBounds, LPCRECTL lprcWBounds, ! BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( ULONG_PTR ), ! ULONG_PTR dwContinue) { return PyGViewObject::Draw(dwDrawAspect, lindex, pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue); } Index: PyIViewObject.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src/PyIViewObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIViewObject.cpp 26 Nov 1999 14:15:06 -0000 1.2 --- PyIViewObject.cpp 24 May 2007 06:01:04 -0000 1.3 *************** *** 255,260 **** /* [in] */ LPCRECTL lprcBounds, /* [unique][in] */ LPCRECTL lprcWBounds, ! /* [in] */ BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( DWORD dwContinueArg ), ! /* [in] */ DWORD dwContinue) { PY_GATEWAY_METHOD; --- 255,260 ---- /* [in] */ LPCRECTL lprcBounds, /* [unique][in] */ LPCRECTL lprcWBounds, ! /* [in] */ BOOL ( STDMETHODCALLTYPE __RPC_FAR *pfnContinue )( ULONG_PTR dwContinueArg ), ! /* [in] */ ULONG_PTR dwContinue) { PY_GATEWAY_METHOD; *************** *** 267,278 **** PyObject *oblprcWBounds = Py_BuildValue("llll", lprcWBounds->left,lprcWBounds->top, lprcWBounds->right, lprcWBounds->bottom); if (oblprcWBounds==NULL) return PyCom_HandlePythonFailureToCOM(); ! PyObject *obFuncContinue = PyInt_FromLong((long)pfnContinue); if (obFuncContinue==NULL) return PyCom_HandlePythonFailureToCOM(); ! HRESULT hr=InvokeViaPolicy("Draw", NULL, "iiOOiiOOOi", dwDrawAspect, lindex, obpvAspect, obptd, hdcTargetDev, hdcDraw, oblprcBounds, oblprcWBounds, obFuncContinue, dwContinue); ! Py_DECREF(obpvAspect); ! Py_DECREF(obptd); ! Py_DECREF(oblprcBounds); ! Py_DECREF(oblprcWBounds); ! Py_DECREF(obFuncContinue); return hr; } --- 267,280 ---- PyObject *oblprcWBounds = Py_BuildValue("llll", lprcWBounds->left,lprcWBounds->top, lprcWBounds->right, lprcWBounds->bottom); if (oblprcWBounds==NULL) return PyCom_HandlePythonFailureToCOM(); ! PyObject *obFuncContinue = PyLong_FromVoidPtr(pfnContinue); if (obFuncContinue==NULL) return PyCom_HandlePythonFailureToCOM(); ! PyObject *obContinue = PyWinObject_FromULONG_PTR(dwContinue); ! HRESULT hr=InvokeViaPolicy("Draw", NULL, "iiOOiiOOOO", dwDrawAspect, lindex, obpvAspect, obptd, hdcTargetDev, hdcDraw, oblprcBounds, oblprcWBounds, obFuncContinue, obContinue); ! Py_XDECREF(obpvAspect); ! Py_XDECREF(obptd); ! Py_XDECREF(oblprcBounds); ! Py_XDECREF(oblprcWBounds); ! Py_XDECREF(obFuncContinue); ! Py_XDECREF(obContinue); return hr; } |
From: Mark H. <mha...@us...> - 2007-05-24 06:01:05
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32comext/taskscheduler/src Modified Files: PyIScheduledWorkItem.cpp Log Message: Another pass at getting things working on x64. This change incorporates most of Sidnei's work on the AMD64 branch, and updates most of the other win32 and win32com modules that haven't already had 64bit love from Roger (thanks guys!). Note this is not complete - among the outstanding issues are fixing 's#' format strings (but most of the tests *do* pass on x64, and the ones which don't fail for 'vista environment' reasons rather than x64 reasons) Index: PyIScheduledWorkItem.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src/PyIScheduledWorkItem.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIScheduledWorkItem.cpp 17 Jan 2007 13:33:25 -0000 1.3 --- PyIScheduledWorkItem.cpp 24 May 2007 06:01:05 -0000 1.4 *************** *** 487,496 **** // @pyparm string|Data||Character data, treated as uninterpreted bytes BYTE *workitem_data=NULL; ! WORD data_len=0; PyObject *obworkitem_data=NULL; if ( !PyArg_ParseTuple(args, "O:PyIScheduledWorkItem::SetWorkItemData", &obworkitem_data)) return NULL; if (obworkitem_data!=Py_None) ! if (PyString_AsStringAndSize(obworkitem_data, (CHAR **)&workitem_data, (int *)&data_len)==-1) return NULL; else --- 487,496 ---- // @pyparm string|Data||Character data, treated as uninterpreted bytes BYTE *workitem_data=NULL; ! Py_ssize_t data_len=0; PyObject *obworkitem_data=NULL; if ( !PyArg_ParseTuple(args, "O:PyIScheduledWorkItem::SetWorkItemData", &obworkitem_data)) return NULL; if (obworkitem_data!=Py_None) ! if (PyString_AsStringAndSize(obworkitem_data, (CHAR **)&workitem_data, &data_len)==-1) return NULL; else *************** *** 501,505 **** HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pISWI->SetWorkItemData(data_len, workitem_data); PY_INTERFACE_POSTCALL; --- 501,506 ---- HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pISWI->SetWorkItemData(PyWin_SAFE_DOWNCAST(data_len, Py_ssize_t, WORD), ! workitem_data); PY_INTERFACE_POSTCALL; |
From: Mark H. <mha...@us...> - 2007-05-24 05:39:14
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15068/win32/test Modified Files: testall.py Log Message: Don't let a simple import error stop other tests from running. Index: testall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/testall.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** testall.py 5 Mar 2005 05:53:39 -0000 1.4 --- testall.py 24 May 2007 05:39:13 -0000 1.5 *************** *** 36,40 **** base, ext = os.path.splitext(file) if ext=='.py' and os.path.basename(me) != file: ! mod = __import__(base) if hasattr(mod, "suite"): test = mod.suite() --- 36,45 ---- base, ext = os.path.splitext(file) if ext=='.py' and os.path.basename(me) != file: ! try: ! mod = __import__(base) ! except ImportError, why: ! print "FAILED to import test module" ! print why ! continue if hasattr(mod, "suite"): test = mod.suite() |
From: Mark H. <mha...@us...> - 2007-05-24 05:38:39
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15039/win32/test Modified Files: test_odbc.py Log Message: missing import in test code that only shows up on failure! Index: test_odbc.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_odbc.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_odbc.py 20 May 2007 11:08:22 -0000 1.6 --- test_odbc.py 24 May 2007 05:38:35 -0000 1.7 *************** *** 10,13 **** --- 10,14 ---- from win32com.client.gencache import EnsureDispatch from win32com.client import constants + import pythoncom class TestStuff(unittest.TestCase): |
From: Mark H. <mha...@us...> - 2007-05-24 05:33:30
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13230/com/win32com/test Modified Files: util.py Log Message: Show what command failed when registering a COM object. Index: util.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/util.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** util.py 26 Aug 2006 08:22:30 -0000 1.7 --- util.py 24 May 2007 05:33:26 -0000 1.8 *************** *** 27,30 **** --- 27,32 ---- rc = os.system(cmd) if rc: + print "Registration command was:" + print cmd raise RuntimeError, "Registration of engine '%s' failed" % filename |
From: Mark H. <mha...@us...> - 2007-05-24 05:30:53
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11780 Modified Files: test_win32pipe.py Log Message: Handle ERROR_PIPE_CONNECTED connecting to a pipe - it just means the other side beat us. Index: test_win32pipe.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32pipe.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_win32pipe.py 16 Jul 2006 11:02:23 -0000 1.2 --- test_win32pipe.py 24 May 2007 05:30:04 -0000 1.3 *************** *** 35,39 **** hr = win32pipe.ConnectNamedPipe(pipeHandle) ! self.failUnlessEqual(0, hr) win32file.WriteFile(pipeHandle, "bar\0foo") hr, got = win32file.ReadFile(pipeHandle, 100) --- 35,39 ---- hr = win32pipe.ConnectNamedPipe(pipeHandle) ! self.failUnless(hr in (0, winerror.ERROR_PIPE_CONNECTED), "Got error code 0x%x" % (hr,)) win32file.WriteFile(pipeHandle, "bar\0foo") hr, got = win32file.ReadFile(pipeHandle, 100) |
From: Mark H. <mha...@us...> - 2007-05-20 12:52:28
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7977 Modified Files: PyIEmptyVolumeCacheCallBack.cpp Log Message: get building with python 2.2 Index: PyIEmptyVolumeCacheCallBack.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIEmptyVolumeCacheCallBack.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIEmptyVolumeCacheCallBack.cpp 15 Feb 2007 13:11:02 -0000 1.1 --- PyIEmptyVolumeCacheCallBack.cpp 20 May 2007 12:52:28 -0000 1.2 *************** *** 6,9 **** --- 6,14 ---- #include "PyIEmptyVolumeCacheCallBack.h" + #ifndef PY_LONG_LONG + // Python 2.2 apparently didn't use a PY_ prefix here... + # define PY_LONG_LONG LONG_LONG + #endif + // @doc - This file contains autoduck documentation // @object PyIEmptyVolumeCacheCallBack|Callback used by <o PyIEmptyVolumeCacheCallBack> |