From: Guido van Rossum Date: Tue, 21 Apr 1998 22:25:01 +0000 (+0000) Subject: Be less naive about null characters in an object's repr(). X-Git-Tag: v1.5.2a1~862 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=565798d4930cf3b557ee43505c21a05d926210d3;p=python Be less naive about null characters in an object's repr(). --- diff --git a/Objects/object.c b/Objects/object.c index 1a1ed52208..3289aba494 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -188,8 +188,8 @@ PyObject_Print(op, fp, flags) ret = -1; } else { - fprintf(fp, "%s", - PyString_AsString(s)); + ret = PyObject_Print(s, fp, + Py_PRINT_RAW); } Py_XDECREF(s); }