[pywin32-checkins] pywin32/win32/src win32file.i,1.66,1.67
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2007-01-06 08:16:41
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14042/win32/src Modified Files: win32file.i Log Message: Remove places where handles parsed with 'l' format Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** win32file.i 20 Nov 2006 22:21:48 -0000 1.66 --- win32file.i 6 Jan 2007 08:16:40 -0000 1.67 *************** *** 1595,1604 **** DWORD filter; DWORD bytes_returned; ! PyObject *obBuffer; PyObject *ret = NULL; PyObject *obOverlapped = Py_None; PyObject *obOverlappedRoutine = Py_None; ! if (!PyArg_ParseTuple(args, "iOii|OO", ! &handle, // @pyparm int|handle||Handle to the directory to be monitored. This directory must be opened with the FILE_LIST_DIRECTORY access right. &obBuffer, // @pyparm int|size||Size of the buffer to allocate for the results. &bWatchSubtree, // @pyparm int|bWatchSubtree||Specifies whether the ReadDirectoryChangesW function will monitor the directory or the directory tree. If TRUE is specified, the function monitors the directory tree rooted at the specified directory. If FALSE is specified, the function monitors only the directory specified by the hDirectory parameter. --- 1595,1604 ---- DWORD filter; DWORD bytes_returned; ! PyObject *obBuffer, *obhandle; PyObject *ret = NULL; PyObject *obOverlapped = Py_None; PyObject *obOverlappedRoutine = Py_None; ! if (!PyArg_ParseTuple(args, "OOii|OO:ReadDirectoryChangesW", ! &obhandle, // @pyparm <o PyHANDLE>|handle||Handle to the directory to be monitored. This directory must be opened with the FILE_LIST_DIRECTORY access right. &obBuffer, // @pyparm int|size||Size of the buffer to allocate for the results. &bWatchSubtree, // @pyparm int|bWatchSubtree||Specifies whether the ReadDirectoryChangesW function will monitor the directory or the directory tree. If TRUE is specified, the function monitors the directory tree rooted at the specified directory. If FALSE is specified, the function monitors only the directory specified by the hDirectory parameter. *************** *** 1616,1620 **** if (!PyWinObject_AsOVERLAPPED(obOverlapped, &pOverlapped)) return NULL; ! // Todo: overlappedRoutine support. if (obOverlappedRoutine != Py_None) --- 1616,1621 ---- if (!PyWinObject_AsOVERLAPPED(obOverlapped, &pOverlapped)) return NULL; ! if (!PyWinObject_AsHANDLE(obhandle, &handle, FALSE)) ! return NULL; // Todo: overlappedRoutine support. if (obOverlappedRoutine != Py_None) *************** *** 1744,1748 **** DWORD iMethod; HANDLE handle; ! if (!PyArg_ParseTuple(args, "OOl", &obHandle, // @pyparm <o PyHANDLE>|handle||The file to perform the operation on. &obOffset, // @pyparm <o Py_LARGEINTEGER>|offset||Offset to move the file pointer. --- 1745,1749 ---- DWORD iMethod; HANDLE handle; ! if (!PyArg_ParseTuple(args, "OOl:SetFilePointer", &obHandle, // @pyparm <o PyHANDLE>|handle||The file to perform the operation on. &obOffset, // @pyparm <o Py_LARGEINTEGER>|offset||Offset to move the file pointer. *************** *** 2824,2828 **** return PyErr_Format(PyExc_NotImplementedError,"SetVolumeMountPoint not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"OO", &mount_point_obj, &volume_obj)) return NULL; --- 2825,2829 ---- return PyErr_Format(PyExc_NotImplementedError,"SetVolumeMountPoint not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"OO:SetVolumeMountPoint", &mount_point_obj, &volume_obj)) return NULL; *************** *** 2873,2877 **** return PyErr_Format(PyExc_NotImplementedError,"DeleteVolumeMountPoint not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"O", &mount_point_obj)) return NULL; --- 2874,2878 ---- return PyErr_Format(PyExc_NotImplementedError,"DeleteVolumeMountPoint not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"O:DeleteVolumeMountPoint", &mount_point_obj)) return NULL; *************** *** 2921,2925 **** if (pfnCreateHardLinkW==NULL) return PyErr_Format(PyExc_NotImplementedError,"CreateHardLink not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"OO|O", &new_file_obj, &existing_file_obj, &sa_obj)) return NULL; --- 2922,2926 ---- if (pfnCreateHardLinkW==NULL) return PyErr_Format(PyExc_NotImplementedError,"CreateHardLink not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"OO|O:CreateHardLink", &new_file_obj, &existing_file_obj, &sa_obj)) return NULL; *************** *** 3033,3037 **** if (pfnEncryptFile==NULL) return PyErr_Format(PyExc_NotImplementedError,"EncryptFile not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"O", &obfname)) return NULL; if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE)) --- 3034,3038 ---- if (pfnEncryptFile==NULL) return PyErr_Format(PyExc_NotImplementedError,"EncryptFile not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"O:EncryptFile", &obfname)) return NULL; if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE)) *************** *** 3080,3084 **** if (pfnEncryptionDisable==NULL) return PyErr_Format(PyExc_NotImplementedError,"EncryptionDisable not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"Oi", &obfname, &Disable)) return NULL; if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE)) --- 3081,3085 ---- if (pfnEncryptionDisable==NULL) return PyErr_Format(PyExc_NotImplementedError,"EncryptionDisable not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"Oi:EncryptionDisable", &obfname, &Disable)) return NULL; if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE)) *************** *** 3108,3112 **** if (pfnFileEncryptionStatus==NULL) return PyErr_Format(PyExc_NotImplementedError,"FileEncryptionStatus not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"O", &obfname)) return NULL; if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE)) --- 3109,3113 ---- if (pfnFileEncryptionStatus==NULL) return PyErr_Format(PyExc_NotImplementedError,"FileEncryptionStatus not supported by this version of Windows"); ! if (!PyArg_ParseTuple(args,"O:FileEncryptionStatus", &obfname)) return NULL; if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE)) *************** *** 3538,3544 **** BOOL bAbort,bProcessSecurity; LPVOID ctxt; ! PyObject *obbuf=NULL, *obbufout=NULL; ! if (!PyArg_ParseTuple(args, "llOlll", &h, &bytes_requested, &obbuf, &bAbort, &bProcessSecurity, &ctxt)) return NULL; if (obbuf==Py_None){ --- 3539,3550 ---- BOOL bAbort,bProcessSecurity; LPVOID ctxt; ! PyObject *obbuf=NULL, *obbufout=NULL, *obh, *obctxt; ! if (!PyArg_ParseTuple(args, "OlOllO:BackupRead", &obh, &bytes_requested, &obbuf, &bAbort, &bProcessSecurity, &obctxt)) ! return NULL; ! if (!PyWinObject_AsHANDLE(obh, &h, FALSE)) ! return NULL; ! ctxt=PyLong_AsVoidPtr(obctxt); ! if ((ctxt==NULL) && PyErr_Occurred()) return NULL; if (obbuf==Py_None){ *************** *** 3582,3587 **** ULARGE_INTEGER bytes_moved; LPVOID ctxt; ! PyObject *obbytes_to_seek; ! if (!PyArg_ParseTuple(args,"lOl", &h, &obbytes_to_seek, &ctxt)) return NULL; if (!PyWinObject_AsULARGE_INTEGER(obbytes_to_seek, &bytes_to_seek)) --- 3588,3598 ---- ULARGE_INTEGER bytes_moved; LPVOID ctxt; ! PyObject *obbytes_to_seek, *obh, *obctxt; ! if (!PyArg_ParseTuple(args,"OOO:BackupSeek", &obh, &obbytes_to_seek, &obctxt)) ! return NULL; ! if (!PyWinObject_AsHANDLE(obh, &h, FALSE)) ! return NULL; ! ctxt=PyLong_AsVoidPtr(obctxt); ! if ((ctxt==NULL) && PyErr_Occurred()) return NULL; if (!PyWinObject_AsULARGE_INTEGER(obbytes_to_seek, &bytes_to_seek)) *************** *** 3619,3625 **** BOOL bAbort, bProcessSecurity; LPVOID ctxt; ! PyObject *obbuf; ! if (!PyArg_ParseTuple(args, "llOlll", &h, &bytes_to_write, &obbuf, &bAbort, &bProcessSecurity, &ctxt)) return NULL; if (PyObject_AsReadBuffer(obbuf, (const void **)&buf, &buflen)==-1) --- 3630,3641 ---- BOOL bAbort, bProcessSecurity; LPVOID ctxt; ! PyObject *obbuf, *obh, *obctxt; ! if (!PyArg_ParseTuple(args, "OlOllO:BackupWrite", &obh, &bytes_to_write, &obbuf, &bAbort, &bProcessSecurity, &obctxt)) ! return NULL; ! if (!PyWinObject_AsHANDLE(obh, &h, FALSE)) ! return NULL; ! ctxt=PyLong_AsVoidPtr(obctxt); ! if ((ctxt==NULL) && PyErr_Occurred()) return NULL; if (PyObject_AsReadBuffer(obbuf, (const void **)&buf, &buflen)==-1) |