summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-10-14 13:16:45 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-10-14 13:16:45 (GMT)
commit1c67dd9b154d57baf58ed081767e199af1e84923 (patch)
tree0d6c95e99785f9b8381c808a5cb433adf319eda5 /Objects/dictobject.c
parentbd928fef428e48084ff29ece0e21d07ad86d0793 (diff)
downloadcpython-1c67dd9b154d57baf58ed081767e199af1e84923.zip
cpython-1c67dd9b154d57baf58ed081767e199af1e84923.tar.gz
cpython-1c67dd9b154d57baf58ed081767e199af1e84923.tar.bz2
Port SetAttrString/HasAttrString to SetAttrId/GetAttrId.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 3896b31..865feff 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1387,7 +1387,8 @@ dict_update_common(PyObject *self, PyObject *args, PyObject *kwds, char *methnam
result = -1;
else if (arg != NULL) {
- if (PyObject_HasAttrString(arg, "keys"))
+ _Py_IDENTIFIER(keys);
+ if (_PyObject_HasAttrId(arg, &PyId_keys))
result = PyDict_Merge(self, arg, 1);
else
result = PyDict_MergeFromSeq2(self, arg, 1);
@@ -2747,7 +2748,7 @@ dictviews_or(PyObject* self, PyObject *other)
{
PyObject *result = PySet_New(self);
PyObject *tmp;
- _Py_identifier(update);
+ _Py_IDENTIFIER(update);
if (result == NULL)
return NULL;