add missing INCREF in RAISE_EXCEPTION

This commit is contained in:
Guido van Rossum 1995-01-20 16:55:14 +00:00
parent 10bb1c46f1
commit 1919ca7b28
1 changed files with 2 additions and 1 deletions

View File

@ -782,6 +782,7 @@ eval_code(co, globals, locals, owner, arg)
while (is_tupleobject(w) && gettuplesize(w) > 0) { while (is_tupleobject(w) && gettuplesize(w) > 0) {
u = w; u = w;
w = gettupleitem(u, 0); w = gettupleitem(u, 0);
INCREF(w);
DECREF(u); DECREF(u);
} }
if (!is_stringobject(w)) if (!is_stringobject(w))
@ -2494,7 +2495,7 @@ import_from(locals, v, name)
{ {
object *w, *x; object *w, *x;
if (!is_moduleobject(v)) { if (!is_moduleobject(v)) {
err_setstr(TypeError, "import-from require module object"); err_setstr(TypeError, "import-from requires module object");
return -1; return -1;
} }
w = getmoduledict(v); w = getmoduledict(v);