summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-25 18:55:08 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-05 14:19:20 -0400
commit7583998db70626720e201ede56ccba56d4520d9a (patch)
tree5d0a8649324f10370b1b1f9ac952b2b834392e6a /systemd
parentc0d8b4e8109f48ed1a21cc677edff0f1462d2f5c (diff)
downloadpython-systemd-7583998db70626720e201ede56ccba56d4520d9a.tar.gz
systemd-python: use modern C
Diffstat (limited to 'systemd')
-rw-r--r--systemd/_reader.c49
1 files changed, 10 insertions, 39 deletions
diff --git a/systemd/_reader.c b/systemd/_reader.c
index 6ac2f20..98a99aa 100644
--- a/systemd/_reader.c
+++ b/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