diff options
Diffstat (limited to 'python/hashstring.cc')
| -rw-r--r-- | python/hashstring.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/hashstring.cc b/python/hashstring.cc index b76dc127..a8d97cd8 100644 --- a/python/hashstring.cc +++ b/python/hashstring.cc @@ -42,9 +42,8 @@ static PyObject *HashString_NEW(PyTypeObject *type,PyObject *Args, static PyObject *HashString_Repr(PyObject *self) { HashString *hash = GetCpp<HashString*>(self); - char repr[100]; - sprintf(repr, "<%s: \"%s\">", self->ob_type->tp_name, hash->toStr().c_str()); - return PyString_FromString(repr); + return PyString_FromFormat("<%s object: \"%s\">", self->ob_type->tp_name, + hash->toStr().c_str()); } static PyObject *HashString_ToStr(PyObject *self) |
