]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
pylibmount: properly mark initialization function
authorThomas Weißschuh <thomas@t-8ch.de>
Thu, 10 Nov 2022 03:05:30 +0000 (04:05 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 10 Nov 2022 03:12:10 +0000 (04:12 +0100)
The module initialization function is supposed to only public function
in a module.
Newer versions of meson use -fvisibility=hidden and expected this
function to be marked with PyMODINIT_FUNC [0].

As this does not hurt on autotools either, let's use it everywhere.

[0] https://mesonbuild.com/Release-notes-for-0-63-0.html#python-extension-modules-now-build-with-hidden-visibility

libmount/python/pylibmount.c

index bfc100fe1d3f37e9f51ad9b222f85c888d3f251d..28856eaffaa2116ed1f8d8512c1e8236b5c9c830 100644 (file)
@@ -195,8 +195,8 @@ static struct PyModuleDef moduledef = {
         NULL
 };
 #define INITERROR return NULL
-PyObject * PyInit_pylibmount(void);
-PyObject * PyInit_pylibmount(void)
+PyMODINIT_FUNC PyInit_pylibmount(void);
+PyMODINIT_FUNC PyInit_pylibmount(void)
 #else
 #define INITERROR return
 # ifndef PyMODINIT_FUNC