diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_struct.c | 2 | ||||
-rw-r--r-- | Modules/cStringIO.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c index dcf315e..28f67e9 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -1486,7 +1486,7 @@ s_init(PyObject *self, PyObject *args, PyObject *kwds) return -1; } - Py_XDECREF(soself->s_format); + Py_CLEAR(soself->s_format); soself->s_format = o_format; ret = prepare_s(soself); diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index 1251c1d..64e2146 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -566,8 +566,7 @@ newOobject(int size) { static PyObject * I_close(Iobject *self, PyObject *unused) { - Py_XDECREF(self->pbuf); - self->pbuf = NULL; + Py_CLEAR(self->pbuf); self->buf = NULL; self->pos = self->string_size = 0; |