From bd44a7ead9f7336d7bb45f186b2b6ca0300154f7 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 16 Nov 2019 18:55:29 +0200 Subject: bpo-38650: Constify PyStructSequence_UnnamedField. (GH-17005) Make it a constant and referring to a constant string. --- Objects/structseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/structseq.c') diff --git a/Objects/structseq.c b/Objects/structseq.c index c158afccb9..c86fbe50b9 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -18,7 +18,7 @@ static const char unnamed_fields_key[] = "n_unnamed_fields"; /* Fields with this name have only a field index, not a field name. They are only allowed for indices < n_visible_fields. */ -char *PyStructSequence_UnnamedField = "unnamed field"; +const char * const PyStructSequence_UnnamedField = "unnamed field"; _Py_IDENTIFIER(n_sequence_fields); _Py_IDENTIFIER(n_fields); _Py_IDENTIFIER(n_unnamed_fields); -- cgit v1.2.1