From 5e8e050ca3421e20c0462df071ff83e8c47ff703 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 15 Aug 2013 00:53:04 -0400 Subject: [PATCH] A few tweaks; py3k support now complete. --- mwparserfromhell/parser/tokenizer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mwparserfromhell/parser/tokenizer.c b/mwparserfromhell/parser/tokenizer.c index c08fb11..88ca3f2 100644 --- a/mwparserfromhell/parser/tokenizer.c +++ b/mwparserfromhell/parser/tokenizer.c @@ -1017,7 +1017,7 @@ static int Tokenizer_really_parse_entity(Tokenizer* self) self->head++; continue; } - if (i >= 8) + if (i >= MAX_ENTITY_SIZE) FAIL_ROUTE_AND_EXIT() for (j = 0; j < NUM_MARKERS; j++) { if (this == *MARKERS[j]) @@ -2332,7 +2332,6 @@ static int load_entitydefs(void) if (!string) return -1; entitydefs[i] = PyBytes_AsString(string); - Py_DECREF(string); #else entitydefs[i] = PyBytes_AsString(PyList_GET_ITEM(deflist, i)); #endif