summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.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/zipimport.c
parent794d567b173e4cc10ad233aeb8743283ea9c3e6b (diff)
downloadcpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.zip
cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.gz
cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.bz2
Use identifier API for PyObject_GetAttrString.
Diffstat (limited to 'Modules/zipimport.c')
-rw-r--r--Modules/zipimport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index 2293e66..3c07866 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -908,6 +908,7 @@ get_decompress_func(void)
static int importing_zlib = 0;
PyObject *zlib;
PyObject *decompress;
+ _Py_identifier(decompress);
if (importing_zlib != 0)
/* Someone has a zlib.py[co] in their Zip file;
@@ -917,8 +918,8 @@ get_decompress_func(void)
zlib = PyImport_ImportModuleNoBlock("zlib");
importing_zlib = 0;
if (zlib != NULL) {
- decompress = PyObject_GetAttrString(zlib,
- "decompress");
+ decompress = _PyObject_GetAttrId(zlib,
+ &PyId_decompress);
Py_DECREF(zlib);
}
else {