diff options
author | Marc-André Lemburg <mal@egenix.com> | 2000-09-18 16:20:57 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2000-09-18 16:20:57 (GMT) |
commit | e44e507b0e60de842f57ca79b45696dd263f257f (patch) | |
tree | 7c2c0714e7bfa7231350b099e5bf8b1a0e0367d9 /Objects/intobject.c | |
parent | 1de8098ca685a2d9e9c5eb2e3ebaeb8190004b4c (diff) | |
download | cpython-e44e507b0e60de842f57ca79b45696dd263f257f.zip cpython-e44e507b0e60de842f57ca79b45696dd263f257f.tar.gz cpython-e44e507b0e60de842f57ca79b45696dd263f257f.tar.bz2 |
PyObject_SetAttr() and PyObject_GetAttr() now also accept Unicode
objects for the attribute name. Unicode objects are converted to
a string using the default encoding before trying the lookup.
Note that previously it was allowed to pass arbitrary objects as
attribute name in case the tp_getattro/setattro slots were defined.
This patch fixes this by applying an explicit string check first:
all uses of these slots expect string objects and do not check
for the type resulting in a core dump. The tp_getattro/setattro
are still useful as optimization for lookups using interned
string objects though.
This patch fixes bug #113829.
Diffstat (limited to 'Objects/intobject.c')
0 files changed, 0 insertions, 0 deletions