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 eryksun
Recipients amaury.forgeotdarc, belopolsky, cgohlke, eryksun, meador.inge, pitrou, python-dev, steve.dower, tim.golden, zach.ware
Date 2016-02-11.09:32:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455183175.18.0.528893094855.issue23606@psf.upfronthosting.co.za>
In-reply-to
Content
If the examples continue to use printf, then msvcrt.dll is the best option. The universal CRT exports a single Swiss-Army-knife function, __stdio_common_vfprintf, which requires 5 parameters, including a va_list for the variadic argument list. That's not appropriate for a tutorial. We just need a docs update to warn that msvcrt.dll has its own set of file descriptors, heap, and thread-locale state.

> Does it mean `cdll.msvcrt` is not the standard way to access 
> the C symbols anymore?

On a tangent, cdll.msvcrt shouldn't be recommended anywhere in the ctypes docs. All code that uses cdll.msvcrt shares the same restype, argtypes, and errcheck prototypes for each function pointer, which is an unholy mess. The docs should recommend CDLL('mscvrt') or CDLL('msvcrt', use_errno=True). Every module or package should use its own private instance of CDLL.
History
Date User Action Args
2016-02-11 09:32:55eryksunsetrecipients: + eryksun, amaury.forgeotdarc, belopolsky, pitrou, tim.golden, cgohlke, meador.inge, python-dev, zach.ware, steve.dower
2016-02-11 09:32:55eryksunsetmessageid: <1455183175.18.0.528893094855.issue23606@psf.upfronthosting.co.za>
2016-02-11 09:32:55eryksunlinkissue23606 messages
2016-02-11 09:32:54eryksuncreate