[pywin32-checkins] pywin32/com/win32com/src/extensions PyIStream.cpp, 1.3, 1.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2007-08-07 17:43:09
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25815/com/win32com/src/extensions Modified Files: PyIStream.cpp Log Message: Return length written from PyIStream::Write Index: PyIStream.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIStream.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIStream.cpp 30 May 2007 07:59:49 -0000 1.3 --- PyIStream.cpp 7 Aug 2007 17:43:09 -0000 1.4 *************** *** 59,62 **** --- 59,63 ---- PyObject *obstrValue; DWORD strSize; + ULONG cbWritten; // @pyparm string|data||The binary data to write. if (!PyArg_ParseTuple(args, "O:Write", &obstrValue)) *************** *** 68,77 **** PY_INTERFACE_PRECALL; ! HRESULT hr = pMy->Write(strValue, strSize, NULL); PY_INTERFACE_POSTCALL; if (FAILED(hr)) return PyCom_BuildPyException(hr, pMy, IID_IStream); ! Py_INCREF(Py_None); ! return Py_None; } --- 69,77 ---- PY_INTERFACE_PRECALL; ! HRESULT hr = pMy->Write(strValue, strSize, &cbWritten); PY_INTERFACE_POSTCALL; if (FAILED(hr)) return PyCom_BuildPyException(hr, pMy, IID_IStream); ! return PyLong_FromUnsignedLong(cbWritten); } |