Commit d42e1dcd authored by Michael Tremer's avatar Michael Tremer

python: Do not use any GNU-style initialisers for structs

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 9f2f5d13
......@@ -145,15 +145,15 @@ static struct PyGetSetDef AS_getsetters[] = {
PyTypeObject ASType = {
PyVarObject_HEAD_INIT(NULL, 0)
tp_name: "location.AS",
tp_basicsize: sizeof(ASObject),
tp_flags: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
tp_new: AS_new,
tp_dealloc: (destructor)AS_dealloc,
tp_init: (initproc)AS_init,
tp_doc: "AS object",
tp_getset: AS_getsetters,
tp_repr: (reprfunc)AS_repr,
tp_str: (reprfunc)AS_str,
tp_richcompare: (richcmpfunc)AS_richcompare,
.tp_name = "location.AS",
.tp_basicsize = sizeof(ASObject),
.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
.tp_new = AS_new,
.tp_dealloc = (destructor)AS_dealloc,
.tp_init = (initproc)AS_init,
.tp_doc = "AS object",
.tp_getset = AS_getsetters,
.tp_repr = (reprfunc)AS_repr,
.tp_str = (reprfunc)AS_str,
.tp_richcompare = (richcmpfunc)AS_richcompare,
};
......@@ -239,16 +239,16 @@ static struct PyGetSetDef Database_getsetters[] = {
PyTypeObject DatabaseType = {
PyVarObject_HEAD_INIT(NULL, 0)
tp_name: "location.Database",
tp_basicsize: sizeof(DatabaseObject),
tp_flags: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
tp_new: Database_new,
tp_dealloc: (destructor)Database_dealloc,
tp_init: (initproc)Database_init,
tp_doc: "Database object",
tp_methods: Database_methods,
tp_getset: Database_getsetters,
tp_repr: (reprfunc)Database_repr,
.tp_name = "location.Database",
.tp_basicsize = sizeof(DatabaseObject),
.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
.tp_new = Database_new,
.tp_dealloc = (destructor)Database_dealloc,
.tp_init = (initproc)Database_init,
.tp_doc = "Database object",
.tp_methods = Database_methods,
.tp_getset = Database_getsetters,
.tp_repr = (reprfunc)Database_repr,
};
static PyObject* DatabaseEnumerator_new(PyTypeObject* type, PyObject* args, PyObject* kwds) {
......@@ -279,12 +279,12 @@ static PyObject* DatabaseEnumerator_next(DatabaseEnumeratorObject* self) {
PyTypeObject DatabaseEnumeratorType = {
PyVarObject_HEAD_INIT(NULL, 0)
tp_name: "location.DatabaseEnumerator",
tp_basicsize: sizeof(DatabaseEnumeratorObject),
tp_flags: Py_TPFLAGS_DEFAULT,
tp_alloc: PyType_GenericAlloc,
tp_new: DatabaseEnumerator_new,
tp_dealloc: (destructor)DatabaseEnumerator_dealloc,
tp_iter: PyObject_SelfIter,
tp_iternext: (iternextfunc)DatabaseEnumerator_next,
.tp_name = "location.DatabaseEnumerator",
.tp_basicsize = sizeof(DatabaseEnumeratorObject),
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_alloc = PyType_GenericAlloc,
.tp_new = DatabaseEnumerator_new,
.tp_dealloc = (destructor)DatabaseEnumerator_dealloc,
.tp_iter = PyObject_SelfIter,
.tp_iternext = (iternextfunc)DatabaseEnumerator_next,
};
......@@ -146,14 +146,14 @@ static struct PyGetSetDef Network_getsetters[] = {
PyTypeObject NetworkType = {
PyVarObject_HEAD_INIT(NULL, 0)
tp_name: "location.Network",
tp_basicsize: sizeof(NetworkObject),
tp_flags: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
tp_new: Network_new,
tp_dealloc: (destructor)Network_dealloc,
tp_init: (initproc)Network_init,
tp_doc: "Network object",
tp_getset: Network_getsetters,
tp_repr: (reprfunc)Network_repr,
tp_str: (reprfunc)Network_str,
.tp_name = "location.Network",
.tp_basicsize = sizeof(NetworkObject),
.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
.tp_new = Network_new,
.tp_dealloc = (destructor)Network_dealloc,
.tp_init = (initproc)Network_init,
.tp_doc = "Network object",
.tp_getset = Network_getsetters,
.tp_repr = (reprfunc)Network_repr,
.tp_str = (reprfunc)Network_str,
};
......@@ -220,13 +220,13 @@ static struct PyGetSetDef Writer_getsetters[] = {
PyTypeObject WriterType = {
PyVarObject_HEAD_INIT(NULL, 0)
tp_name: "location.Writer",
tp_basicsize: sizeof(WriterObject),
tp_flags: Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
tp_new: Writer_new,
tp_dealloc: (destructor)Writer_dealloc,
tp_init: (initproc)Writer_init,
tp_doc: "Writer object",
tp_methods: Writer_methods,
tp_getset: Writer_getsetters,
.tp_name = "location.Writer",
.tp_basicsize = sizeof(WriterObject),
.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
.tp_new = Writer_new,
.tp_dealloc = (destructor)Writer_dealloc,
.tp_init = (initproc)Writer_init,
.tp_doc = "Writer object",
.tp_methods = Writer_methods,
.tp_getset = Writer_getsetters,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment