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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, kristjan.jonsson, loewis, mhammond
Date 2009-04-01.13:35:50
SpamBayes Score 7.950884e-09
Marked as misclassified No
Message-id <1238592954.71.0.520730816385.issue5623@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-04-01 13:35:55amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, loewis, mhammond, kristjan.jonsson
2009-04-01 13:35:54amaury.forgeotdarcsetmessageid: <1238592954.71.0.520730816385.issue5623@psf.upfronthosting.co.za>
2009-04-01 13:35:53amaury.forgeotdarclinkissue5623 messages
2009-04-01 13:35:52amaury.forgeotdarccreate