summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-28 01:51:35 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-09-28 01:51:35 (GMT)
commit6429a4727e4bb8bcb0d3deefaefe195e63e6bb6e (patch)
treec7b2a929436e44c3678b83c8da7a6e3c7f80c948 /Objects/setobject.c
parentb6f7fb7327a80ff976bba3a5e982b06a39dcf87c (diff)
downloadcpython-6429a4727e4bb8bcb0d3deefaefe195e63e6bb6e.zip
cpython-6429a4727e4bb8bcb0d3deefaefe195e63e6bb6e.tar.gz
cpython-6429a4727e4bb8bcb0d3deefaefe195e63e6bb6e.tar.bz2
Use Py_CLEAR(). Add unrelated test.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 289d5d3..d57217c 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -105,7 +105,7 @@ frozenset_dict_wrapper(PyObject *d)
w = (PySetObject *)make_new_set(&PyFrozenSet_Type, NULL);
if (w == NULL)
return NULL;
- Py_DECREF(w->data);
+ Py_CLEAR(w->data);
Py_INCREF(d);
w->data = d;
return (PyObject *)w;