summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-10-10 16:11:30 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-10-10 16:11:30 (GMT)
commit1ee1b6fe0dd7baca0da50e365929d03d42128705 (patch)
treeae048787548a8915d3e75054a950f710ed521d84 /Modules/posixmodule.c
parent794d567b173e4cc10ad233aeb8743283ea9c3e6b (diff)
downloadcpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.zip
cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.gz
cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.bz2
Use identifier API for PyObject_GetAttrString.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index b19f1b3..30760ed 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -6103,6 +6103,7 @@ wait_helper(pid_t pid, int status, struct rusage *ru)
{
PyObject *result;
static PyObject *struct_rusage;
+ _Py_identifier(struct_rusage);
if (pid == -1)
return posix_error();
@@ -6111,7 +6112,7 @@ wait_helper(pid_t pid, int status, struct rusage *ru)
PyObject *m = PyImport_ImportModuleNoBlock("resource");
if (m == NULL)
return NULL;
- struct_rusage = PyObject_GetAttrString(m, "struct_rusage");
+ struct_rusage = _PyObject_GetAttrId(m, &PyId_struct_rusage);
Py_DECREF(m);
if (struct_rusage == NULL)
return NULL;