bpo-38650: Constify PyStructSequence_UnnamedField. (GH-17005)

Make it a constant and referring to a constant string.
This commit is contained in:
Serhiy Storchaka 2019-11-16 18:55:29 +02:00 committed by GitHub
parent 5fd5cb8d85
commit bd44a7ead9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 3 deletions

View file

@ -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);