[pywin32-checkins] /hgroot/pywin32/pywin32: Fix PyOpenStreamOnFile build error on p...
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2014-01-25 03:43:38
|
changeset e2cdf93c66b5 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=e2cdf93c66b5 summary: Fix PyOpenStreamOnFile build error on py3.x versions diffstat: com/win32comext/mapi/src/mapi.i | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diffs (19 lines): diff -r e83b6c43e736 -r e2cdf93c66b5 com/win32comext/mapi/src/mapi.i --- a/com/win32comext/mapi/src/mapi.i Sat Jan 25 14:23:00 2014 +1100 +++ b/com/win32comext/mapi/src/mapi.i Sat Jan 25 14:43:34 2014 +1100 @@ -802,9 +802,13 @@ HRESULT hRes; unsigned long flags = 0; IStream *pStream; - char *filepath; + PyObject *obFilepath; - if (!PyArg_ParseTuple(args, "s|l:OpenStreamOnFile", &filepath, &flags)) + if (!PyArg_ParseTuple(args, "O|l:OpenStreamOnFile", &obFilepath, &flags)) + return NULL; + + TCHAR *filepath; + if (!PyWinObject_AsTCHAR(obFilepath, &filepath, FALSE)) return NULL; PY_INTERFACE_PRECALL; |