diff options
author | shadchin <shadchin@yandex-team.com> | 2024-12-23 19:39:02 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2024-12-23 19:54:20 +0300 |
commit | 65a5bf9d37a3b29eb394f560b9a09318196c40e8 (patch) | |
tree | e5cd68fb0682b2388e52d9806bb87adc348e21a8 /contrib/tools/python3/Parser/action_helpers.c | |
parent | a1dd87a52878ab3e46e5fd2dba5ecbba6113d7e0 (diff) | |
download | ydb-65a5bf9d37a3b29eb394f560b9a09318196c40e8.tar.gz |
Update Python 3 to 3.12.8
commit_hash:c20045b8a987d8720e1f3328270357491d5530f3
Diffstat (limited to 'contrib/tools/python3/Parser/action_helpers.c')
-rw-r--r-- | contrib/tools/python3/Parser/action_helpers.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/tools/python3/Parser/action_helpers.c b/contrib/tools/python3/Parser/action_helpers.c index 085622e655..be52d89495 100644 --- a/contrib/tools/python3/Parser/action_helpers.c +++ b/contrib/tools/python3/Parser/action_helpers.c @@ -1043,6 +1043,9 @@ expr_ty _PyPegen_collect_call_seqs(Parser *p, asdl_expr_seq *a, asdl_seq *b, } asdl_expr_seq *args = _Py_asdl_expr_seq_new(total_len, arena); + if (args == NULL) { + return NULL; + } Py_ssize_t i = 0; for (i = 0; i < args_len; i++) { @@ -1210,6 +1213,9 @@ unpack_top_level_joined_strs(Parser *p, asdl_expr_seq *raw_expressions) { } asdl_expr_seq *expressions = _Py_asdl_expr_seq_new(req_size, p->arena); + if (expressions == NULL) { + return NULL; + } Py_ssize_t raw_index, req_index = 0; for (raw_index = 0; raw_index < raw_size; raw_index++) { @@ -1400,6 +1406,9 @@ expr_ty _PyPegen_formatted_value(Parser *p, expr_ty expression, Token *debug, } asdl_expr_seq *values = _Py_asdl_expr_seq_new(2, arena); + if (values == NULL) { + return NULL; + } asdl_seq_SET(values, 0, debug_text); asdl_seq_SET(values, 1, formatted_value); return _PyAST_JoinedStr(values, lineno, col_offset, debug_end_line, |