This patch should remove the need for the typemap fix in [#154] entirely. The patch however unfortunately repeats the same ~20 line change in each of the interface class implementations. With this change, passing the MAPI_UNICODE
flag has an effect on both the requested and returned values.
An additional function PyWinObject_FromMAPIStr()
is introduced to ensure the returned strings are coerced to the expected type:
MAPI_UNICODE
was not passed, PyUnicode_DecodeMBCS()
is called.MAPI_UNICODE
was not passed, PyString_FromString()
is called.Additionally, PyObject_FromMAPIERROR()
has been changed to simply call PyWinObject_FromMAPIStr()
Old Patches - new patches via https://github.com/mhammond/pywin32/pulls: #154
Old Patches - new patches via https://github.com/mhammond/pywin32/pulls: #157
4389:e32aa302e540