Kaydet (Commit) a1b0c9fc authored tarafından Victor Stinner's avatar Victor Stinner

PyArg_Parse*("U"): ensure that the Unicode string is ready

üst 87ea780e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment