[Barry] > ... > Heh, I was going to suggest that this might be a good place to > substitute a call to PyString_FromFormat*() but then I read this > little nugget: > > case 'd': case 'i': case 'x': > (void) va_arg(count, int); > /* 20 bytes should be enough to > hold a 64-bit > integer */ > n += 20; > break; This use of 20 is fine (I checked all occurrences of "20" in the codebase, BTW); int_repr's use of 20 was wrong because it failed to allow for the trailing \0 byte too; the loop in PyString_FromFormatV doesn't have to worry about that (PyString_FromStringAndSize() later adds 1 of its own for the trailing \0 -- of course it doesn't actually add anything, but it adds 1 "in effect" <wink -- jeez, C string handling is obscure!>).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4