
changeset: 72548:a1be34457ccf user: Victor Stinner <victor.stinner at haypocalc.com> date: Sat Oct 01 01:05:40 2011 +0200 summary: pyexat uses the new Unicode API
files: Modules/pyexpat.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1234,11 +1234,13 @@ static PyObject * xmlparse_getattro(xmlparseobject *self, PyObject *nameobj) { - const Py_UNICODE *name; + Py_UCS4 first_char; int handlernum = -1;
if (!PyUnicode_Check(nameobj)) goto generic; + if (PyUnicode_READY(nameobj)) + return NULL;
Why is this PyUnicode_READY necessary? Can tp_getattro pass unfinished unicode objects? I hope we don't have to update all extension modules? -- Amaury Forgeot d'Arc