Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1919ca7

Browse files
committed
add missing INCREF in RAISE_EXCEPTION
1 parent 10bb1c4 commit 1919ca7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Python/ceval.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ eval_code(co, globals, locals, owner, arg)
782782
while (is_tupleobject(w) && gettuplesize(w) > 0) {
783783
u = w;
784784
w = gettupleitem(u, 0);
785+
INCREF(w);
785786
DECREF(u);
786787
}
787788
if (!is_stringobject(w))
@@ -2494,7 +2495,7 @@ import_from(locals, v, name)
24942495
{
24952496
object *w, *x;
24962497
if (!is_moduleobject(v)) {
2497-
err_setstr(TypeError, "import-from require module object");
2498+
err_setstr(TypeError, "import-from requires module object");
24982499
return -1;
24992500
}
25002501
w = getmoduledict(v);

0 commit comments

Comments
 (0)