mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
systemd-python: use modern C
This commit is contained in:
parent
a521ae4a56
commit
b59f043c3d
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user