[pywin32-checkins] /hgroot/pywin32/pywin32: 2 new changesets
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2015-05-20 07:30:14
|
changeset 53d839a67e9e in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=53d839a67e9e summary: Ensure argv[0] is a string object in COM objects on py3k changeset b06d711ff578 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=b06d711ff578 summary: Update win32file.ReadFile docs to indicate bytes should be used instead of str on py3k (issue 695) diffstat: CHANGES.txt | 4 ++++ com/win32com/src/dllmain.cpp | 2 +- win32/src/win32file.i | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diffs (38 lines): diff -r b57d0d7444fb -r b06d711ff578 CHANGES.txt --- a/CHANGES.txt Mon Apr 13 12:53:59 2015 -0400 +++ b/CHANGES.txt Wed May 20 17:06:03 2015 +1000 @@ -4,6 +4,10 @@ hg log -rb2xx: > log.out However contributors are encouraged to add their own entries for their work. +Since build 219: +* win32com - sys.argv[0] may be set to a bytes object instead of a string on + Python 3 when implementing an in-process COM object. + Since build 218: ---------------- * win32com.mapi diff -r b57d0d7444fb -r b06d711ff578 com/win32com/src/dllmain.cpp --- a/com/win32com/src/dllmain.cpp Mon Apr 13 12:53:59 2015 -0400 +++ b/com/win32com/src/dllmain.cpp Wed May 20 17:06:03 2015 +1000 @@ -67,7 +67,7 @@ // Make sure we have _something_ as sys.argv. if (PySys_GetObject("argv")==NULL) { PyObject *path = PyList_New(0); - PyObject *str = PyString_FromString(""); + PyObject *str = PyWinCoreString_FromString(""); PyList_Append(path, str); PySys_SetObject("argv", path); Py_XDECREF(path); diff -r b57d0d7444fb -r b06d711ff578 win32/src/win32file.i --- a/win32/src/win32file.i Mon Apr 13 12:53:59 2015 -0400 +++ b/win32/src/win32file.i Wed May 20 17:06:03 2015 +1000 @@ -889,7 +889,7 @@ // @rdesc The result is a tuple of (hr, string/<o PyOVERLAPPEDReadBuffer>), where hr may be // 0, ERROR_MORE_DATA or ERROR_IO_PENDING. // If the overlapped param is not None, then the result is a <o PyOVERLAPPEDReadBuffer>. Once the overlapped IO operation -// has completed, you can convert this to a string (str(object))to obtain the data. +// has completed, you can convert this to a string (str(object)) [py2k] or (bytes(object)) [py3k] to obtain the data. // While the operation is in progress, you can use the slice operations (object[:end]) to // obtain the data read so far. // You must use the OVERLAPPED API functions to determine how much of the data is valid. |