From: Walter Dörwald Date: Mon, 11 Jun 2007 16:03:16 +0000 (+0000) Subject: Simplify ste_repr(). X-Git-Tag: v3.0a1~793 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d4ede181128d17166de5b74e047eef12e9e6f47;p=python Simplify ste_repr(). --- diff --git a/Python/symtable.c b/Python/symtable.c index 5df7318d17..0f7642a2c5 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -88,13 +88,9 @@ PySTEntry_New(struct symtable *st, identifier name, _Py_block_ty block, static PyObject * ste_repr(PySTEntryObject *ste) { - char buf[256]; - - PyOS_snprintf(buf, sizeof(buf), - "", - PyUnicode_AsString(ste->ste_name), - PyInt_AS_LONG(ste->ste_id), ste->ste_lineno); - return PyUnicode_FromString(buf); + return PyUnicode_FromFormat("", + ste->ste_name, + PyInt_AS_LONG(ste->ste_id), ste->ste_lineno); } static void