summaryrefslogtreecommitdiff
path: root/Objects/funcobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-12 17:00:41 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-12 17:00:41 +0000
commit3f1af5c42e915775e9cc32224e090b05430a23de (patch)
tree0456ab762d139e628bc6e559291854a1a01a3feb /Objects/funcobject.c
parent50981b8242af6a456cf17e39df6a12b0f98524df (diff)
downloadcpython-git-3f1af5c42e915775e9cc32224e090b05430a23de.tar.gz
Issue #6697: use %U format instead of _PyUnicode_AsString(), because
_PyUnicode_AsString() was not checked for error (NULL). The unicode string is no more truncated to 200 or 400 *bytes*.
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r--Objects/funcobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 16851a942d..35fc32d659 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -295,9 +295,9 @@ func_set_code(PyFunctionObject *op, PyObject *value)
PyTuple_GET_SIZE(op->func_closure));
if (nclosure != nfree) {
PyErr_Format(PyExc_ValueError,
- "%s() requires a code object with %zd free vars,"
+ "%U() requires a code object with %zd free vars,"
" not %zd",
- _PyUnicode_AsString(op->func_name),
+ op->func_name,
nclosure, nfree);
return -1;
}