summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 17c4ee5..9f72fa4 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1167,8 +1167,11 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
case 'U': { /* PyUnicode object */
PyObject **p = va_arg(*p_va, PyObject **);
- if (PyUnicode_Check(arg))
+ if (PyUnicode_Check(arg)) {
+ if (PyUnicode_READY(arg) == -1)
+ RETURN_ERR_OCCURRED;
*p = arg;
+ }
else
return converterr("str", arg, msgbuf, bufsize);
break;