Commit 565798d4 authored by Guido van Rossum's avatar Guido van Rossum

Be less naive about null characters in an object's repr().

parent 031a68fe
...@@ -188,8 +188,8 @@ PyObject_Print(op, fp, flags) ...@@ -188,8 +188,8 @@ PyObject_Print(op, fp, flags)
ret = -1; ret = -1;
} }
else { else {
fprintf(fp, "%s", ret = PyObject_Print(s, fp,
PyString_AsString(s)); Py_PRINT_RAW);
} }
Py_XDECREF(s); Py_XDECREF(s);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment