homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2010年06月11日.00:09:10
SpamBayes Score 0.031434815
Marked as misclassified No
Message-id <1276214955.6.0.858876193041.issue8967@psf.upfronthosting.co.za>
In-reply-to
Content
PyErr_SetExcFromWindowsErrWithFilenameObject() and PyErr_SetFromErrnoWithFilenameObject() have the same code to read the localized error message. The code can be factorized in a new function PyErr_GetWindowsMessage().
About the patch:
 - free s_buf just after the call to PyUnicode_FromUnicode(), don't wait until the end of the function
 - free s_buf if s_buf is not NULL and len==0. I suppose that this case is impossible, if len==0, s_buf is set to NULL or leaved unchanged (so it's also equal to NULL)
I wrote the function to raise an UnicodeDecodeError with a Windows error message.
History
Date User Action Args
2010年06月11日 00:09:16vstinnersetrecipients: + vstinner
2010年06月11日 00:09:15vstinnersetmessageid: <1276214955.6.0.858876193041.issue8967@psf.upfronthosting.co.za>
2010年06月11日 00:09:13vstinnerlinkissue8967 messages
2010年06月11日 00:09:12vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /