diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-09 10:38:36 +0200 | 
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-09 10:38:36 +0200 | 
| commit | afe55bba33a20f87a58f940186359237064b428f (patch) | |
| tree | 66d64a1518d79c3d0e90c0a1d0080cd88e887d99 /Modules/_collectionsmodule.c | |
| parent | 67df285a3389c7fdb8c7bd301314ac45e17f8074 (diff) | |
| download | cpython-git-afe55bba33a20f87a58f940186359237064b428f.tar.gz | |
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
Diffstat (limited to 'Modules/_collectionsmodule.c')
| -rw-r--r-- | Modules/_collectionsmodule.c | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 156ad1863c..40e253d390 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1334,13 +1334,15 @@ defdict_reduce(defdictobject *dd)      PyObject *items;      PyObject *iter;      PyObject *result; +    _Py_identifier(items); +      if (dd->default_factory == NULL || dd->default_factory == Py_None)          args = PyTuple_New(0);      else          args = PyTuple_Pack(1, dd->default_factory);      if (args == NULL)          return NULL; -    items = PyObject_CallMethod((PyObject *)dd, "items", "()"); +    items = _PyObject_CallMethodId((PyObject *)dd, &PyId_items, "()");      if (items == NULL) {          Py_DECREF(args);          return NULL;  | 
