We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6e4279 commit f8d1a2dCopy full SHA for f8d1a2d
Modules/_decimal/_decimal.c
@@ -6153,16 +6153,16 @@ decimal_clear(PyObject *module)
6153
6154
if (state->signal_map != NULL) {
6155
for (DecCondMap *cm = state->signal_map; cm->name != NULL; cm++) {
6156
- Py_CLEAR(cm->ex);
+ Py_DECREF(cm->ex);
6157
}
6158
PyMem_Free(state->signal_map);
6159
state->signal_map = NULL;
6160
6161
6162
if (state->cond_map != NULL) {
6163
- state->cond_map[0].ex = NULL; // decref'ed at signal_map[0].ex
+ // cond_map[0].ex has borrowed a reference from signal_map[0].ex
6164
for (DecCondMap *cm = state->cond_map + 1; cm->name != NULL; cm++) {
6165
6166
6167
PyMem_Free(state->cond_map);
6168
state->cond_map = NULL;
0 commit comments