summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-02 23:07:07 (GMT)
committerGuido van Rossum <guido@python.org>2007-11-02 23:07:07 (GMT)
commite845c0f92244ad45a204420e23ebeb53c1a9bd79 (patch)
tree6e955f6c3bb266d082ab16506b272a91c80b3c01 /Python
parent15c974651f7bb8e54a008359cf306a8e8ec13c12 (diff)
downloadcpython-e845c0f92244ad45a204420e23ebeb53c1a9bd79.zip
cpython-e845c0f92244ad45a204420e23ebeb53c1a9bd79.tar.gz
cpython-e845c0f92244ad45a204420e23ebeb53c1a9bd79.tar.bz2
Fixes for issue 1752184, ensuring type objects are always created
with a PyUnicode name.
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-ast.c2
-rw-r--r--Python/errors.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index d89b610..0ccf489 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -410,7 +410,7 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
}
PyTuple_SET_ITEM(fnames, i, field);
}
- result = PyObject_CallFunction((PyObject*)&PyType_Type, "s(O){sOss}",
+ result = PyObject_CallFunction((PyObject*)&PyType_Type, "U(O){sOss}",
type, base, "_fields", fnames, "__module__", "_ast");
Py_DECREF(fnames);
return (PyTypeObject*)result;
diff --git a/Python/errors.c b/Python/errors.c
index e543506..b45dad4 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -608,7 +608,7 @@ PyErr_NewException(const char *name, PyObject *base, PyObject *dict)
goto failure;
}
/* Create a real new-style class. */
- result = PyObject_CallFunction((PyObject *)&PyType_Type, "sOO",
+ result = PyObject_CallFunction((PyObject *)&PyType_Type, "UOO",
dot+1, bases, dict);
failure:
Py_XDECREF(bases);