Alexander Belopolsky added the comment: Aha! I did not know about the cleanup. Maybe that should be documented as well.
This shows that using O& with a converter returning a PyObject* is a bad idea. (General clean-up is not possible for O& because there is no way to tell what type the converter returns.) I am still +1 on your original patch. It is obviously correct and fixes the bug with minimum of changes. However, win32 code in posixmodule.c needs some clean-up. convert_to_unicode should be eliminated in favor of the approach used in win32_1str. It may also make sense to move conversion/api selection code to a win32_2str function. Even if it will be only used for rename, it will make the code more readable by making win32 code structure similar to posix. All this is a topic for another issue. I believe the only thing that needs to be done here is to enable error case testing for all platforms in the unit test. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2222> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com