Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: I found a correction using the _msize() function, which returns the size of a malloc'ed block. It is used to compute sizeof(ioinfo) at runtime.
The exact definition of the structure is no longer important; only the first two fields are needed, which is a good thing IMO. Now the code seems really independent from changes in the CRT. Patch is attached. The test (info->osfhnd == _get_osfhandle(fd)) is not really needed, I left it outside an assert() because I wanted to test it on release builds. Tested (only) with VS2005, sizeof_ioinfo is correctly computed when presented to different versions of MSVCR80.dll. ---------- keywords: +patch Added file: http://bugs.python.org/file13537/verify_fd.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5623> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com