[pywin32-checkins] pywin32/win32/src/win32print win32print.cpp, 1.24, 1.25
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
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); |