[issue28148] [Patch] Also stop using localtime() in timemodule
Ed Schouten
report at bugs.python.org
Wed Sep 14 15:21:42 EDT 2016
Ed Schouten added the comment:
As a person who keeps a close eye on the Austin Group mailing lists (i.e., 'the POSIX working group'), my guess is that it's very unlikely that POSIX will ever add those *_s() extensions. Here's a discussion on Reddit that actually captures all of the arguments pretty well:
https://www.reddit.com/r/C_Programming/comments/3ivi77/eli5_why_does_glibc_still_not_support_the/
That said, any API will do. The localtime_r() function has the disadvantage that the return value is a bit odd: can it return any other tm structure than the one provided? localtime_s() is a bit weird in that its input argument is stored after the output argument. Both functions also unnecessarily pass the time_t by reference. Maybe we can just pick a prototype that's as Pythonesque as possible that also fixes these shortcomings. Any thoughts?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28148>
_______________________________________
More information about the Python-bugs-list
mailing list