diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-11-02 04:04:57 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-11-02 04:04:57 +0000 |
commit | f2bae721c199a8e35ab2272984dda5bcc081d45d (patch) | |
tree | 7803b62f3048b11f9be40f4e329fedbf40f363f4 /Modules/atexitmodule.c | |
parent | 83fc8c09e3c0a071b0f0900b1cb7a1755638741a (diff) | |
parent | 4ec569b31165987c3f55b2401db5404a2a50ab2f (diff) | |
download | cpython-f2bae721c199a8e35ab2272984dda5bcc081d45d.tar.gz |
Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5
Diffstat (limited to 'Modules/atexitmodule.c')
-rw-r--r-- | Modules/atexitmodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c index b9c344ac3d..3cdf2d7e56 100644 --- a/Modules/atexitmodule.c +++ b/Modules/atexitmodule.c @@ -60,7 +60,7 @@ atexit_cleanup(atexitmodule_state *modstate) modstate->ncallbacks = 0; } -/* Installed into pythonrun.c's atexit mechanism */ +/* Installed into pylifecycle.c's atexit mechanism */ static void atexit_callfuncs(void) @@ -94,7 +94,7 @@ atexit_callfuncs(void) if (exc_type) { Py_DECREF(exc_type); Py_XDECREF(exc_value); - Py_XDECREF(exc_tb); + Py_XDECREF(exc_tb); } PyErr_Fetch(&exc_type, &exc_value, &exc_tb); if (!PyErr_ExceptionMatches(PyExc_SystemExit)) { @@ -147,7 +147,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs) if (PyTuple_GET_SIZE(args) == 0) { PyErr_SetString(PyExc_TypeError, "register() takes at least 1 argument (0 given)"); - return NULL; + return NULL; } func = PyTuple_GET_ITEM(args, 0); @@ -159,7 +159,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs) new_callback = PyMem_Malloc(sizeof(atexit_callback)); if (new_callback == NULL) - return PyErr_NoMemory(); + return PyErr_NoMemory(); new_callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); if (new_callback->args == NULL) { @@ -336,7 +336,7 @@ PyInit_atexit(void) modstate = GET_ATEXIT_STATE(m); modstate->callback_len = 32; modstate->ncallbacks = 0; - modstate->atexit_callbacks = PyMem_New(atexit_callback*, + modstate->atexit_callbacks = PyMem_New(atexit_callback*, modstate->callback_len); if (modstate->atexit_callbacks == NULL) return NULL; |