summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-09-29 23:31:11 (GMT)
committerGuido van Rossum <guido@python.org>1997-09-29 23:31:11 (GMT)
commit4f3bf1e383c0a5d10c8b581d0ca6d0140e3abce6 (patch)
tree1c8e1c929fbc83bc4523cbe8081572bf427fbed6 /Objects
parentb4cfdfa0776cb547145ffc41d6aff8406d31609e (diff)
downloadcpython-4f3bf1e383c0a5d10c8b581d0ca6d0140e3abce6.zip
cpython-4f3bf1e383c0a5d10c8b581d0ca6d0140e3abce6.tar.gz
cpython-4f3bf1e383c0a5d10c8b581d0ca6d0140e3abce6.tar.bz2
Don't intern the key string for getitem and delitem.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/dictobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 66cec0c..3362655 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1011,7 +1011,6 @@ PyDict_GetItemString(v, key)
kv = PyString_FromString(key);
if (kv == NULL)
return NULL;
- PyString_InternInPlace(&kv);
rv = PyDict_GetItem(v, kv);
Py_DECREF(kv);
return rv;
@@ -1028,7 +1027,7 @@ PyDict_SetItemString(v, key, item)
kv = PyString_FromString(key);
if (kv == NULL)
return -1;
- PyString_InternInPlace(&kv);
+ PyString_InternInPlace(&kv); /* XXX Should we really? */
err = PyDict_SetItem(v, kv, item);
Py_DECREF(kv);
return err;
@@ -1044,7 +1043,6 @@ PyDict_DelItemString(v, key)
kv = PyString_FromString(key);
if (kv == NULL)
return -1;
- PyString_InternInPlace(&kv);
err = PyDict_DelItem(v, kv);
Py_DECREF(kv);
return err;