[issue41170] Use strnlen instead of strlen when the size i known.
Larry Hastings
report at bugs.python.org
Wed Jul 1 08:33:44 EDT 2020
Larry Hastings <larry at hastings.org> added the comment:
strnlen() isn't standard C, but an exciting new function strnlen_s() is, as of C11.
https://en.cppreference.com/w/c/string/byte/strlen
(At this rate, we should be able to code CPython using that standard in about 2030.)
But! I found a 2005 thread on /. talking about strnlen in MSVC. So maybe it's there. Though Microsoft has this funny habit of putting an underscore in front of C library functions that aren't standard, so maybe it's _strnlen().
----------
nosy: +larry
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41170>
_______________________________________
More information about the Python-bugs-list
mailing list