Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
methane committed Dec 13, 2017
commit de2effedf53dc4a4609cc33b440bfef399a74c03
4 changes: 2 additions & 2 deletions Python/ast_opt.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* File automatically generated by Parser/asdl_ct.py and ast_opt.ct. */
/* AST Optimizer */
#include "Python.h"
#include "Python-ast.h"

Expand Down Expand Up @@ -191,8 +191,8 @@ fold_binop(expr_ty node, PyArena *arena)
/* Avoid creating large constants. */
Py_ssize_t size = PyObject_Size(newval);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newval can be NULL.

if (size == -1) {
Py_DECREF(newval);
if (PyErr_ExceptionMatches(PyExc_KeyboardInterrupt)) {
Py_DECREF(newval);
return 0;
}
PyErr_Clear();
Expand Down