From 5d4ede181128d17166de5b74e047eef12e9e6f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Mon, 11 Jun 2007 16:03:16 +0000 Subject: Simplify ste_repr(). --- Python/symtable.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Python/symtable.c b/Python/symtable.c index 5df7318..0f7642a 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 -- cgit v0.12