Jon Anglin <jang...@fortresgrand.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9784>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to