Commit 4f3bf1e3 authored by Guido van Rossum's avatar Guido van Rossum

Don't intern the key string for getitem and delitem.

parent b4cfdfa0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment