aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Parser/action_helpers.c
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-10-27 10:52:33 +0300
committershadchin <shadchin@yandex-team.com>2024-10-27 11:03:47 +0300
commit1529383373617c6d14ad4972afdc46a5eb35f954 (patch)
tree229b7647fafadd4ee4b93d20e606c534ad697365 /contrib/tools/python3/Parser/action_helpers.c
parent41d598c624442bf6918407466dac3316b8277347 (diff)
downloadydb-1529383373617c6d14ad4972afdc46a5eb35f954.tar.gz
Update Python 3 to 3.12.7
commit_hash:052a122399d67f1ea5dfbc5f6457e3e06200becf
Diffstat (limited to 'contrib/tools/python3/Parser/action_helpers.c')
-rw-r--r--contrib/tools/python3/Parser/action_helpers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/tools/python3/Parser/action_helpers.c b/contrib/tools/python3/Parser/action_helpers.c
index 45a32a0213..085622e655 100644
--- a/contrib/tools/python3/Parser/action_helpers.c
+++ b/contrib/tools/python3/Parser/action_helpers.c
@@ -4,6 +4,7 @@
#include "pycore_runtime.h" // _PyRuntime
#include "string_parser.h"
#include "tokenizer.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
void *_PyPegen_dummy_name(Parser *p, ...) {
return &_PyRuntime.parser.dummy_name;
@@ -148,7 +149,8 @@ expr_ty _PyPegen_join_names_with_dot(Parser *p, expr_ty first_name,
if (!uni) {
return NULL;
}
- PyUnicode_InternInPlace(&uni);
+ PyInterpreterState *interp = _PyInterpreterState_GET();
+ _PyUnicode_InternMortal(interp, &uni);
if (_PyArena_AddPyObject(p->arena, uni) < 0) {
Py_DECREF(uni);
return NULL;