mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
make _Py_static_string_init use a designated initializer
This commit is contained in:
parent
fe8f4c9e87
commit
5223f08e78
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ typedef struct _Py_Identifier {
|
||||||
PyObject *object;
|
PyObject *object;
|
||||||
} _Py_Identifier;
|
} _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_static_string(varname, value) static _Py_Identifier varname = _Py_static_string_init(value)
|
||||||
#define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)
|
#define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue