diff options
Diffstat (limited to 'Objects/genobject.c')
-rw-r--r-- | Objects/genobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index b1c51a8..d2ef508 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -285,10 +285,10 @@ static PyObject * gen_repr(PyGenObject *gen) { char *code_name; - code_name = PyBytes_AsString(((PyCodeObject *)gen->gi_code)->co_name); + code_name = PyString_AsString(((PyCodeObject *)gen->gi_code)->co_name); if (code_name == NULL) return NULL; - return PyBytes_FromFormat("<generator object %.200s at %p>", + return PyString_FromFormat("<generator object %.200s at %p>", code_name, gen); } |