diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 16:11:30 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 16:11:30 (GMT) |
commit | 1ee1b6fe0dd7baca0da50e365929d03d42128705 (patch) | |
tree | ae048787548a8915d3e75054a950f710ed521d84 /Modules/parsermodule.c | |
parent | 794d567b173e4cc10ad233aeb8743283ea9c3e6b (diff) | |
download | cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.zip cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.gz cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.bz2 |
Use identifier API for PyObject_GetAttrString.
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r-- | Modules/parsermodule.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index f1679d7..3f03cee 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -3241,10 +3241,13 @@ PyInit_parser(void) copyreg = PyImport_ImportModuleNoBlock("copyreg"); if (copyreg != NULL) { PyObject *func, *pickler; + _Py_identifier(pickle); + _Py_identifier(sequence2st); + _Py_identifier(_pickler); - func = PyObject_GetAttrString(copyreg, "pickle"); - pickle_constructor = PyObject_GetAttrString(module, "sequence2st"); - pickler = PyObject_GetAttrString(module, "_pickler"); + func = _PyObject_GetAttrId(copyreg, &PyId_pickle); + pickle_constructor = _PyObject_GetAttrId(module, &PyId_sequence2st); + pickler = _PyObject_GetAttrId(module, &PyId__pickler); Py_XINCREF(pickle_constructor); if ((func != NULL) && (pickle_constructor != NULL) && (pickler != NULL)) { |