diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 18:11:30 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 18:11:30 +0200 |
commit | 1ee1b6fe0dd7baca0da50e365929d03d42128705 (patch) | |
tree | ae048787548a8915d3e75054a950f710ed521d84 /Modules/arraymodule.c | |
parent | 794d567b173e4cc10ad233aeb8743283ea9c3e6b (diff) | |
download | cpython-git-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.gz |
Use identifier API for PyObject_GetAttrString.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r-- | Modules/arraymodule.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 6cedee4ef2..cb86de721b 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2003,14 +2003,16 @@ array_reduce_ex(arrayobject *array, PyObject *value) int mformat_code; static PyObject *array_reconstructor = NULL; long protocol; + _Py_identifier(_array_reconstructor); + _Py_identifier(__dict__); if (array_reconstructor == NULL) { PyObject *array_module = PyImport_ImportModule("array"); if (array_module == NULL) return NULL; - array_reconstructor = PyObject_GetAttrString( + array_reconstructor = _PyObject_GetAttrId( array_module, - "_array_reconstructor"); + &PyId__array_reconstructor); Py_DECREF(array_module); if (array_reconstructor == NULL) return NULL; @@ -2025,7 +2027,7 @@ array_reduce_ex(arrayobject *array, PyObject *value) if (protocol == -1 && PyErr_Occurred()) return NULL; - dict = PyObject_GetAttrString((PyObject *)array, "__dict__"); + dict = _PyObject_GetAttrId((PyObject *)array, &PyId___dict__); if (dict == NULL) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) return NULL; |