--- a/mercurial/parsers.c Sun May 13 12:11:50 2012 +0200
+++ b/mercurial/parsers.c Sun May 13 11:56:50 2012 +0200
@@ -471,12 +471,8 @@
if (self->cache) {
Py_ssize_t i;
- for (i = 0; i < self->raw_length; i++) {
- if (self->cache[i]) {
- Py_DECREF(self->cache[i]);
- self->cache[i] = NULL;
- }
- }
+ for (i = 0; i < self->raw_length; i++)
+ Py_CLEAR(self->cache[i]);
free(self->cache);
self->cache = NULL;
}
@@ -922,10 +918,8 @@
nt_insert(self, PyString_AS_STRING(node), -1);
}
- if (start == 0) {
- Py_DECREF(self->added);
- self->added = NULL;
- }
+ if (start == 0)
+ Py_CLEAR(self->added);
}
/*