[pywin32-checkins] pywin32/win32/src win32file.i, 1.93.2.3, 1.93.2.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-11-13 15:12:53
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7256 Modified Files: Tag: py3k win32file.i Log Message: Fix buffer resizing for Py3k Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.93.2.3 retrieving revision 1.93.2.4 diff -C2 -d -r1.93.2.3 -r1.93.2.4 *** win32file.i 13 Oct 2008 06:47:14 -0000 1.93.2.3 --- win32file.i 13 Nov 2008 15:12:49 -0000 1.93.2.4 *************** *** 327,331 **** // @pyparm <o PyUnicode>|fileName||The filename to delete ! /* %{ // @pyswig str/buffer|DeviceIoControl|Sends a control code to a device or file system driver --- 327,331 ---- // @pyparm <o PyUnicode>|fileName||The filename to delete ! %{ // @pyswig str/buffer|DeviceIoControl|Sends a control code to a device or file system driver *************** *** 429,434 **** if (bBuffer){ // Create a view of existing buffer with actual output size ! // Reimplement by using ob->tp_as_buffer->getbuffer, but there's no way to specify an offset ! PyObject *resized=PyBuffer_FromReadWriteObject(ret, 0, numRead); Py_DECREF(ret); ret=resized; --- 429,438 ---- if (bBuffer){ // Create a view of existing buffer with actual output size ! // Memoryview object in py3k supports slicing ! #if (PY_VERSION_HEX >= 0x03000000) ! PyObject *resized=PySequence_GetSlice(ret, 0, numRead); ! #else ! PyObject *resized=PyBuffer_FromReadWriteObject(ret, 0, numRead); ! #endif Py_DECREF(ret); ret=resized; *************** *** 442,446 **** %} %native(DeviceIoControl) pfnpy_DeviceIoControl; ! */ %native (OVERLAPPED) PyWinMethod_NewOVERLAPPED; --- 446,450 ---- %} %native(DeviceIoControl) pfnpy_DeviceIoControl; ! %native (OVERLAPPED) PyWinMethod_NewOVERLAPPED; *************** *** 650,656 **** BOOLAPI GetFileTime( HANDLE handle, // @pyparm <o PyHANDLE>|handle||Handle to the file. ! FILETIME *OUTPUT, // @pyparm <o PyTime>|creationTime|| ! FILETIME *OUTPUT, // @pyparm <o PyTime>|accessTime|| ! FILETIME *OUTPUT // @pyparm <o PyTime>|writeTime|| ); --- 654,660 ---- BOOLAPI GetFileTime( HANDLE handle, // @pyparm <o PyHANDLE>|handle||Handle to the file. ! FILETIME *OUTPUT, ! FILETIME *OUTPUT, ! FILETIME *OUTPUT ); |