Remove arbitrary string length limits

PyUnicode_FromFormat() and PyErr_Format() allocates a buffer of the needed
size, it is no more a fixed-buffer of 500 bytes.
This commit is contained in:
Victor Stinner 2011-01-05 03:33:26 +00:00
parent 477efb3944
commit aaa4e9a438
2 changed files with 3 additions and 3 deletions

View file

@ -590,7 +590,7 @@ decoding_fgets(char *s, int size, struct tok_state *tok)
if (filename != NULL) {
PyErr_Format(PyExc_SyntaxError,
"Non-UTF-8 code starting with '\\x%.2x' "
"in file %.200U on line %i, "
"in file %U on line %i, "
"but no encoding declared; "
"see http://python.org/dev/peps/pep-0263/ for details",
badchar, filename, tok->lineno + 1);