##// END OF EJS Templates
parsers: use Py_CLEAR where appropriate
Bryan O'Sullivan -
r16732:277e2acb default
parent child Browse files
Show More
@@ -471,12 +471,8 b' static void _index_clearcaches(indexObje'
471 471 if (self->cache) {
472 472 Py_ssize_t i;
473 473
474 for (i = 0; i < self->raw_length; i++) {
475 if (self->cache[i]) {
476 Py_DECREF(self->cache[i]);
477 self->cache[i] = NULL;
478 }
479 }
474 for (i = 0; i < self->raw_length; i++)
475 Py_CLEAR(self->cache[i]);
480 476 free(self->cache);
481 477 self->cache = NULL;
482 478 }
@@ -922,10 +918,8 b' static void nt_invalidate_added(indexObj'
922 918 nt_insert(self, PyString_AS_STRING(node), -1);
923 919 }
924 920
925 if (start == 0) {
926 Py_DECREF(self->added);
927 self->added = NULL;
928 }
921 if (start == 0)
922 Py_CLEAR(self->added);
929 923 }
930 924
931 925 /*
General Comments 0
You need to be logged in to leave comments. Login now