summaryrefslogtreecommitdiff
path: root/Modules/_posixsubprocess.c
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-04-13 21:27:19 -0400
committerR David Murray <rdmurray@bitdance.com>2012-04-13 21:27:19 -0400
commitea7bc055b08fb442986e0735b1b5b325b0b51ecc (patch)
tree20c2b837c787daf7e95ece075e6544627b17625a /Modules/_posixsubprocess.c
parentc32365d2ce552d1d17279e30a564509235ffb1db (diff)
parentc2c9c905706160bf34aea12f2348210aac3e0da2 (diff)
downloadcpython-ea7bc055b08fb442986e0735b1b5b325b0b51ecc.tar.gz
Merge #14399: corrected news item
Diffstat (limited to 'Modules/_posixsubprocess.c')
-rw-r--r--Modules/_posixsubprocess.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 81274e12c8..8d3af6e877 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -47,7 +47,9 @@ static int
_enable_gc(PyObject *gc_module)
{
PyObject *result;
- result = PyObject_CallMethod(gc_module, "enable", NULL);
+ _Py_IDENTIFIER(enable);
+
+ result = _PyObject_CallMethodId(gc_module, &PyId_enable, NULL);
if (result == NULL)
return 1;
Py_DECREF(result);
@@ -78,7 +80,7 @@ _pos_int_from_ascii(char *name)
* that properly supports /dev/fd.
*/
static int
-_is_fdescfs_mounted_on_dev_fd()
+_is_fdescfs_mounted_on_dev_fd(void)
{
struct stat dev_stat;
struct stat dev_fd_stat;
@@ -534,10 +536,13 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
/* We need to call gc.disable() when we'll be calling preexec_fn */
if (preexec_fn != Py_None) {
PyObject *result;
+ _Py_IDENTIFIER(isenabled);
+ _Py_IDENTIFIER(disable);
+
gc_module = PyImport_ImportModule("gc");
if (gc_module == NULL)
return NULL;
- result = PyObject_CallMethod(gc_module, "isenabled", NULL);
+ result = _PyObject_CallMethodId(gc_module, &PyId_isenabled, NULL);
if (result == NULL) {
Py_DECREF(gc_module);
return NULL;
@@ -548,7 +553,7 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
Py_DECREF(gc_module);
return NULL;
}
- result = PyObject_CallMethod(gc_module, "disable", NULL);
+ result = _PyObject_CallMethodId(gc_module, &PyId_disable, NULL);
if (result == NULL) {
Py_DECREF(gc_module);
return NULL;