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

This commit is contained in:
Guido van Rossum 1998-04-21 22:25:01 +00:00
parent 031a68fe5f
commit 565798d493
1 changed files with 2 additions and 2 deletions

View File

@ -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);
} }