]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
make _Py_static_string_init use a designated initializer
authorBenjamin Peterson <benjamin@python.org>
Wed, 7 Sep 2016 17:33:28 +0000 (10:33 -0700)
committerBenjamin Peterson <benjamin@python.org>
Wed, 7 Sep 2016 17:33:28 +0000 (10:33 -0700)
Include/object.h

index 85bfce36908a48f415a7c2c3a062a4dfd4fead6a..9ad6bdfb33ca5d11eaed0661d6724bc135f222cb 100644 (file)
@@ -144,7 +144,7 @@ typedef struct _Py_Identifier {
     PyObject *object;
 } _Py_Identifier;
 
-#define _Py_static_string_init(value) { 0, value, 0 }
+#define _Py_static_string_init(value) { .next = NULL, .string = value, .object = NULL }
 #define _Py_static_string(varname, value)  static _Py_Identifier varname = _Py_static_string_init(value)
 #define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)