[Python-checkins] bpo-39522: Always initialise kind attribute in constant ast nodes (GH-19525)

Pablo Galindo webhook-mailer at python.org
Tue Apr 14 16:40:45 EDT 2020


https://github.com/python/cpython/commit/33986465bde2a2188537c4ef6cdb6055e348f31f
commit: 33986465bde2a2188537c4ef6cdb6055e348f31f
branch: master
author: Pablo Galindo <Pablogsal at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-04-14T21:40:41+01:00
summary:

bpo-39522: Always initialise kind attribute in constant ast nodes (GH-19525)

files:
M Python/ast_opt.c

diff --git a/Python/ast_opt.c b/Python/ast_opt.c
index 1393c3473bf54..1766321a11a5b 100644
--- a/Python/ast_opt.c
+++ b/Python/ast_opt.c
@@ -19,6 +19,7 @@ make_const(expr_ty node, PyObject *val, PyArena *arena)
         return 0;
     }
     node->kind = Constant_kind;
+    node->v.Constant.kind = NULL;
     node->v.Constant.value = val;
     return 1;
 }



More information about the Python-checkins mailing list