diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:34 +0000 |
commit | 1272be04be0cb803eec87f602edb2e3e6f111aea (patch) | |
tree | bce17f6478cdd9f3c4ec3d751135dc42786d6a56 /libmount/python | |
parent | Releasing progress-linux version 2.39.3-11~progress7.99u1. (diff) | |
download | util-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.tar.xz util-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.zip |
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libmount/python')
-rw-r--r-- | libmount/python/context.c | 48 | ||||
-rw-r--r-- | libmount/python/fs.c | 48 | ||||
-rw-r--r-- | libmount/python/meson.build | 30 | ||||
-rw-r--r-- | libmount/python/tab.c | 48 |
4 files changed, 48 insertions, 126 deletions
diff --git a/libmount/python/context.c b/libmount/python/context.c index 353a893..36cf488 100644 --- a/libmount/python/context.c +++ b/libmount/python/context.c @@ -1175,43 +1175,17 @@ static PyObject *Context_repr(ContextObjext *self) PyTypeObject ContextType = { PyVarObject_HEAD_INIT(NULL, 0) - "libmount.Context", /*tp_name*/ - sizeof(ContextObjext), /*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 = "libmount.Context", + .tp_basicsize = sizeof(ContextObjext), + .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) diff --git a/libmount/python/fs.c b/libmount/python/fs.c index e989124..ccb2460 100644 --- a/libmount/python/fs.c +++ b/libmount/python/fs.c @@ -832,43 +832,17 @@ static PyObject *Fs_copy_fs(FsObject *self, PyObject *args, PyObject *kwds) PyTypeObject FsType = { PyVarObject_HEAD_INIT(NULL, 0) - "libmount.Fs", /*tp_name*/ - sizeof(FsObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor)Fs_destructor, /*tp_dealloc*/ - 0, /*tp_print*/ - NULL, /*tp_getattr*/ - NULL, /*tp_setattr*/ - NULL, /*tp_compare*/ - (reprfunc)Fs_repr, /*tp_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*/ - Fs_HELP, /* tp_doc */ - NULL, /* tp_traverse */ - NULL, /* tp_clear */ - NULL, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - NULL, /* tp_iter */ - NULL, /* tp_iternext */ - Fs_methods, /* tp_methods */ - Fs_members, /* tp_members */ - Fs_getseters, /* tp_getset */ - NULL, /* tp_base */ - NULL, /* tp_dict */ - NULL, /* tp_descr_get */ - NULL, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Fs_init, /* tp_init */ - NULL, /* tp_alloc */ - Fs_new, /* tp_new */ + .tp_name = "libmount.Fs", + .tp_basicsize = sizeof(FsObject), + .tp_dealloc = (destructor)Fs_destructor, + .tp_repr = (reprfunc)Fs_repr, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .tp_doc = Fs_HELP, + .tp_methods = Fs_methods, + .tp_members = Fs_members, + .tp_getset = Fs_getseters, + .tp_init = (initproc)Fs_init, + .tp_new = Fs_new, }; void FS_AddModuleObject(PyObject *mod) diff --git a/libmount/python/meson.build b/libmount/python/meson.build index c5feb7b..e1a79d1 100644 --- a/libmount/python/meson.build +++ b/libmount/python/meson.build @@ -17,23 +17,23 @@ if LINUX pylibmount_sources += 'context.c' endif -python.extension_module( - 'pylibmount', - pylibmount_sources, - include_directories : [dir_include, dir_libmount], - subdir : 'libmount', - link_with : lib_mount, - dependencies : python.dependency(), - c_args : [ - '-Wno-cast-function-type', +if build_python + python.extension_module( + 'pylibmount', + pylibmount_sources, + include_directories : [dir_include, dir_libmount], + subdir : 'libmount', + link_with : lib_mount, + dependencies : python.dependency(), + c_args : [ + '-Wno-cast-function-type', - # https://github.com/util-linux/util-linux/issues/2366 - python.language_version().version_compare('>=3.12') ? - [ '-Wno-error=redundant-decls' ] : [], - ], - install : true) + # https://github.com/util-linux/util-linux/issues/2366 + python.language_version().version_compare('>=3.12') ? + [ '-Wno-error=redundant-decls' ] : [], + ], + install : true) -if build_python python.install_sources( '__init__.py', subdir : 'libmount', diff --git a/libmount/python/tab.c b/libmount/python/tab.c index 000bc13..d33a1fe 100644 --- a/libmount/python/tab.c +++ b/libmount/python/tab.c @@ -731,43 +731,17 @@ static PyObject *Table_repr(TableObject *self) PyTypeObject TableType = { PyVarObject_HEAD_INIT(NULL, 0) - "libmount.Table", /*tp_name*/ - sizeof(TableObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor)Table_destructor, /*tp_dealloc*/ - 0, /*tp_print*/ - NULL, /*tp_getattr*/ - NULL, /*tp_setattr*/ - NULL, /*tp_compare*/ - (reprfunc) Table_repr, /*tp_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*/ - Table_HELP, /* tp_doc */ - NULL, /* tp_traverse */ - NULL, /* tp_clear */ - NULL, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - NULL, /* tp_iter */ - NULL, /* tp_iternext */ - Table_methods, /* tp_methods */ - Table_members, /* tp_members */ - Table_getseters, /* tp_getset */ - NULL, /* tp_base */ - NULL, /* tp_dict */ - NULL, /* tp_descr_get */ - NULL, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)Table_init, /* tp_init */ - NULL, /* tp_alloc */ - Table_new, /* tp_new */ + .tp_name = "libmount.Table", + .tp_basicsize = sizeof(TableObject), + .tp_dealloc = (destructor)Table_destructor, + .tp_repr = (reprfunc) Table_repr, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .tp_doc = Table_HELP, + .tp_methods = Table_methods, + .tp_members = Table_members, + .tp_getset = Table_getseters, + .tp_init = (initproc)Table_init, + .tp_new = Table_new, }; void Table_AddModuleObject(PyObject *mod) |