[Python-Dev] test_builtin failing? or just 64-bit platforms
Sun, 2 Dec 2001 03:44:28 -0500
> The uses of PyOS_snprintf() in sysmodule.c actually checks the return
> value. It always checked the sprintf() returned value and triggered a
> Py_FatalError() if the return value was too big. I changed it to
> print a warning message that the output was truncated.
The test appeared off on both ends to me, so I fiddled this code. Please
check the new version against your vision of sanity (my vision: there's
nothing special about -1: any return value < 0 is a problem; and there's
also a problem if the return value equals the buffer size, since the return
value is exclusive of the \0 byte).