summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-25 15:46:59 +0000
committerWalter Dörwald <walter@livinglogic.de>2007-05-25 15:46:59 +0000
commit6f6f8683eb66f946844a8407d4739dc64b19e453 (patch)
tree11736d2ab16fe81a9529824bd30f3197cec1711b /Python/compile.c
parent7376490d11acb9af72412145b96a4a43a789b86d (diff)
downloadcpython-6f6f8683eb66f946844a8407d4739dc64b19e453.tar.gz
Change PyErr_Format() to generate a unicode string (by using
PyUnicode_FromFormatV() instead of PyString_FromFormatV()). Change calls to PyErr_Format() to benefit from the new format specifiers: Using %S, object instead of %s, PyString_AS_STRING(object) with will work with unicode objects too.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index ffca8307e5..359de587c5 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2467,9 +2467,9 @@ mangled = _Py_Mangle(c->u->u_private, name);
break;
case Del:
PyErr_Format(PyExc_SyntaxError,
- "can not delete variable '%s' referenced "
+ "can not delete variable '%S' referenced "
"in nested scope",
- PyString_AS_STRING(name));
+ name);
Py_DECREF(mangled);
return 0;
case Param: