diff options
Diffstat (limited to 'Modules/_testsinglephase.c')
-rw-r--r-- | Modules/_testsinglephase.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Modules/_testsinglephase.c b/Modules/_testsinglephase.c index 922b410..c42a15a 100644 --- a/Modules/_testsinglephase.c +++ b/Modules/_testsinglephase.c @@ -137,13 +137,7 @@ init_module(PyObject *module, module_state *state) } double d = _PyTime_AsSecondsDouble(state->initialized); - PyObject *initialized = PyFloat_FromDouble(d); - if (initialized == NULL) { - return -1; - } - int rc = PyModule_AddObjectRef(module, "_module_initialized", initialized); - Py_DECREF(initialized); - if (rc < 0) { + if (PyModule_Add(module, "_module_initialized", PyFloat_FromDouble(d)) < 0) { return -1; } |