Alexander Belopolsky added the comment:

> we should likely introduce full wrappers that have a name starting with 
> _PyTime_, right?


Yes, and I would like to give some thought to what the best API would be. The 
two choices are to emulate localtime_r on Windows or emulate localtime_s on 
POSIX. While localtime_r is probably a better known function, localtime_s has 
been standardized by C11 and may appear on POSIX platforms in the future.

Also, I think _PyTime_localtime_r/s should include the 

 #ifdef EINVAL
         if (errno == 0)
             errno = EINVAL;
 #endif

code that is repeated everywhere in the current codebase.

----------

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

Reply via email to