summaryrefslogtreecommitdiffstats
path: root/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'context.c')
-rw-r--r--context.c48
1 files changed, 11 insertions, 37 deletions
diff --git a/context.c b/context.c
index 6841a4f..0d3e646 100644
--- a/context.c
+++ b/context.c
@@ -200,43 +200,17 @@ static PyObject *Context_repr(ContextObject *self)
PyTypeObject ContextType = {
PyVarObject_HEAD_INIT(NULL, 0)
- "libfdisk.Context", /*tp_name*/
- sizeof(ContextObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)Context_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- NULL, /*tp_getattr*/
- NULL, /*tp_setattr*/
- NULL, /*tp_compare*/
- (reprfunc) Context_repr,
- NULL, /*tp_as_number*/
- NULL, /*tp_as_sequence*/
- NULL, /*tp_as_mapping*/
- NULL, /*tp_hash */
- NULL, /*tp_call*/
- NULL, /*tp_str*/
- NULL, /*tp_getattro*/
- NULL, /*tp_setattro*/
- NULL, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
- Context_HELP, /* tp_doc */
- NULL, /* tp_traverse */
- NULL, /* tp_clear */
- NULL, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- NULL, /* tp_iter */
- NULL, /* tp_iternext */
- Context_methods, /* tp_methods */
- Context_members, /* tp_members */
- Context_getseters, /* tp_getset */
- NULL, /* tp_base */
- NULL, /* tp_dict */
- NULL, /* tp_descr_get */
- NULL, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)Context_init, /* tp_init */
- NULL, /* tp_alloc */
- Context_new, /* tp_new */
+ .tp_name = "libfdisk.Context",
+ .tp_basicsize = sizeof(ContextObject),
+ .tp_dealloc = (destructor)Context_dealloc,
+ .tp_repr = (reprfunc) Context_repr,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_doc = Context_HELP,
+ .tp_methods = Context_methods,
+ .tp_members = Context_members,
+ .tp_getset = Context_getseters,
+ .tp_init = (initproc)Context_init,
+ .tp_new = Context_new,
};
void Context_AddModuleObject(PyObject *mod)