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/_datetimemodule.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/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index eb6998f..4dceaa9 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -3077,12 +3077,14 @@ tzinfo_reduce(PyObject *self) { PyObject *args, *state, *tmp; PyObject *getinitargs, *getstate; + _Py_identifier(__getinitargs__); + _Py_identifier(__getstate__); tmp = PyTuple_New(0); if (tmp == NULL) return NULL; - getinitargs = PyObject_GetAttrString(self, "__getinitargs__"); + getinitargs = _PyObject_GetAttrId(self, &PyId___getinitargs__); if (getinitargs != NULL) { args = PyObject_CallObject(getinitargs, tmp); Py_DECREF(getinitargs); @@ -3097,7 +3099,7 @@ tzinfo_reduce(PyObject *self) Py_INCREF(args); } - getstate = PyObject_GetAttrString(self, "__getstate__"); + getstate = _PyObject_GetAttrId(self, &PyId___getstate__); if (getstate != NULL) { state = PyObject_CallObject(getstate, tmp); Py_DECREF(getstate); |