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 janglin
Recipients amaury.forgeotdarc, janglin, loewis, pitrou
Date 2010-09-25.01:10:49
SpamBayes Score 5.597188e-08
Marked as misclassified No
Message-id <1285377052.31.0.352382282021.issue9784@psf.upfronthosting.co.za>
In-reply-to
Content
Martin Lowis do you mean API when you type SDK?  If I understand what you are saying, you would rather use the Win32 API instead of the CRT API?  

It may interest you to know that _open calls CreateFile internally, _read calls ReadFile, _write calls WriteFile, _lseek calls SetFilePointer, and _close calls CloseHandle.  There is a bit more to it than that but it is not really relevant to this discussion.

What is relevant is that inside _open, CreateFile will return an OS HANDLE type (64 bits in our case) that is mapped to a 32 bit integer CRT file descriptor that is then returned.  The other functions such as _read, etc…, will look up the 64 bit OS HANDLE value from the given 32 bit file descriptor and call the corresponding Win32 API function.

We could rewrite the functions using the Win32 API directly but we don’t have to.  I realize this is a Windows only module but the use of the CRT API is more familiar to a majority of the Python developers (I would guess).

I stand by the patch.
History
Date User Action Args
2010-09-25 01:10:52janglinsetrecipients: + janglin, loewis, amaury.forgeotdarc, pitrou
2010-09-25 01:10:52janglinsetmessageid: <1285377052.31.0.352382282021.issue9784@psf.upfronthosting.co.za>
2010-09-25 01:10:51janglinlinkissue9784 messages
2010-09-25 01:10:49janglincreate