[pywin32-checkins] pywin32/win32/src/win32print win32print.cpp, 1.30, 1.31
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-13 11:12:09
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32print In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9817/win32/src/win32print Modified Files: win32print.cpp Log Message: Yet more TCHAR/64bit and other misc changes from py3k branch. Index: win32print.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32print/win32print.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** win32print.cpp 10 Feb 2008 13:35:33 -0000 1.30 --- win32print.cpp 13 Nov 2008 11:11:58 -0000 1.31 *************** *** 1030,1041 **** JOB_INFO_2 *job2; JOB_INFO_3 *job3; ! SYSTEMTIME localSubmitted; ! PyObject *pylocalsubmitted, *ret; switch (level){ case 1:{ job1= (JOB_INFO_1 *)buf; ! SystemTimeToTzSpecificLocalTime(NULL, &(job1->Submitted), &localSubmitted); ! pylocalsubmitted= new PyTime(localSubmitted); ! ret= Py_BuildValue("{s:k, s:N, s:N, s:N, s:N, s:N, s:N, s:k, s:k, s:k, s:k, s:k, s:O}", "JobId", job1->JobId, "pPrinterName", PyWinObject_FromTCHAR(job1->pPrinterName), --- 1030,1038 ---- JOB_INFO_2 *job2; JOB_INFO_3 *job3; ! PyObject *ret; switch (level){ case 1:{ job1= (JOB_INFO_1 *)buf; ! ret= Py_BuildValue("{s:k, s:N, s:N, s:N, s:N, s:N, s:N, s:k, s:k, s:k, s:k, s:k, s:N}", "JobId", job1->JobId, "pPrinterName", PyWinObject_FromTCHAR(job1->pPrinterName), *************** *** 1050,1062 **** "TotalPages", job1->TotalPages, "PagesPrinted", job1->PagesPrinted, ! "Submitted", pylocalsubmitted); ! Py_XDECREF(pylocalsubmitted); return ret; } case 2:{ job2=(JOB_INFO_2 *)buf; ! SystemTimeToTzSpecificLocalTime(NULL, &(job2->Submitted), &localSubmitted); ! pylocalsubmitted= new PyTime(localSubmitted); ! ret= Py_BuildValue("{s:k, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:k, s:k, s:k, s:k, s:k, s:k, s:k, s:O, s:k, s:k}", "JobId", job2->JobId, "pPrinterName", PyWinObject_FromTCHAR(job2->pPrinterName), --- 1047,1056 ---- "TotalPages", job1->TotalPages, "PagesPrinted", job1->PagesPrinted, ! "Submitted", PyWinObject_FromSYSTEMTIME(job1->Submitted)); return ret; } case 2:{ job2=(JOB_INFO_2 *)buf; ! ret= Py_BuildValue("{s:k, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:N, s:k, s:k, s:k, s:k, s:k, s:k, s:k, s:N, s:k, s:k}", "JobId", job2->JobId, "pPrinterName", PyWinObject_FromTCHAR(job2->pPrinterName), *************** *** 1079,1086 **** "TotalPages", job2->TotalPages, "Size", job2->Size, ! "Submitted", pylocalsubmitted, "Time", job2->Time, "PagesPrinted", job2->PagesPrinted); - Py_XDECREF(pylocalsubmitted); return ret; } --- 1073,1079 ---- "TotalPages", job2->TotalPages, "Size", job2->Size, ! "Submitted", PyWinObject_FromSYSTEMTIME(job2->Submitted), "Time", job2->Time, "PagesPrinted", job2->PagesPrinted); return ret; } *************** *** 2585,2589 **** /* List of functions exported by this module */ ! // @module win32print|A module, encapsulating the Windows Win32 API. static struct PyMethodDef win32print_functions[] = { {"OpenPrinter", PyOpenPrinter, 1}, // @pymeth OpenPrinter|Retrieves a handle to a printer. --- 2578,2582 ---- /* List of functions exported by this module */ ! // @module win32print|A module encapsulating the Windows printing API. static struct PyMethodDef win32print_functions[] = { {"OpenPrinter", PyOpenPrinter, 1}, // @pymeth OpenPrinter|Retrieves a handle to a printer. *************** *** 2837,2839 **** dummy_tuple=PyTuple_New(0); } - --- 2830,2831 ---- |