summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/python-systemd/_reader.c49
1 files changed, 10 insertions, 39 deletions
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index 6ac2f20491..98a99aa0ab 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -1046,48 +1046,20 @@ static PyMethodDef Reader_methods[] = {
static PyTypeObject ReaderType = {
PyVarObject_HEAD_INIT(NULL, 0)
- "_reader._Reader", /*tp_name*/
- sizeof(Reader), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)Reader_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare*/
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
- Reader__doc__, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- Reader_methods, /* tp_methods */
- 0, /* tp_members */
- Reader_getsetters, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc) Reader_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
+ .tp_name = "_reader._Reader",
+ .tp_basicsize = sizeof(Reader),
+ .tp_dealloc = (destructor) Reader_dealloc,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_doc = Reader__doc__,
+ .tp_methods = Reader_methods,
+ .tp_getset = Reader_getsetters,
+ .tp_init = (initproc) Reader_init,
+ .tp_new = PyType_GenericNew,
};
static PyMethodDef methods[] = {
{ "_get_catalog", get_catalog, METH_VARARGS, get_catalog__doc__},
- { NULL, NULL, 0, NULL } /* Sentinel */
+ {} /* Sentinel */
};
#if PY_MAJOR_VERSION >= 3
@@ -1097,7 +1069,6 @@ static PyModuleDef module = {
module__doc__,
-1,
methods,
- NULL, NULL, NULL, NULL
};
#endif