Skip to content

Commit 031dec9

Browse files
committed
login: silence warning about missing initializer for slots
[5/10] Compiling C object src/systemd/login.cpython-313-x86_64-linux-gnu.so.p/login.c.o ../src/systemd/login.c:321:1: warning: missing initializer for field ‘m_slots’ of ‘struct PyModuleDef’ [-Wmissing-field-initializers] 321 | }; | ^ In file included from /usr/include/python3.13/Python.h:95, from ../src/systemd/login.c:6: /usr/include/python3.13/moduleobject.h:113:21: note: ‘m_slots’ declared here 113 | PyModuleDef_Slot *m_slots; | ^~~~~~~
1 parent 0f23367 commit 031dec9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/systemd/login.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,11 @@ static PyTypeObject MonitorType = {
314314

315315
static struct PyModuleDef module = {
316316
PyModuleDef_HEAD_INIT,
317-
"login", /* name of module */
318-
module__doc__, /* module documentation, may be NULL */
319-
-1, /* size of per-interpreter state of the module */
320-
methods
317+
.m_name = "login", /* name of module */
318+
.m_doc = module__doc__, /* module documentation, may be NULL */
319+
.m_size = -1, /* size of per-interpreter state of the module */
320+
.m_methods = methods,
321+
.m_slots = NULL,
321322
};
322323

323324
DISABLE_WARNING_MISSING_PROTOTYPES;

0 commit comments

Comments
 (0)