1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2024-10-26 07:55:06 +03:00

Switch to PyMODINIT_FUNC annotation

Instead of doing some 'extern ...' declaration magic to force
proper PyInit_libvirtmod*() symbol exposure in resulting .so we
can use what Python already offers - PyMODINIT_FUNC macro and
call it a day.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2024-04-26 18:26:01 +02:00 committed by Daniel P. Berrangé
parent a6b8929083
commit 39b7773d32
3 changed files with 3 additions and 21 deletions

View File

@ -21,12 +21,6 @@
#include "libvirt-utils.h"
#include "libvirt-lxc.h"
#ifndef __CYGWIN__
extern PyObject *PyInit_libvirtmod_lxc(void);
#else
extern PyObject *PyInit_cygvirtmod_lxc(void);
#endif
#if 0
# define DEBUG_ERROR 1
#endif
@ -115,7 +109,7 @@ static struct PyModuleDef moduledef = {
NULL
};
PyObject *
PyMODINIT_FUNC
#ifndef __CYGWIN__
PyInit_libvirtmod_lxc
#else

View File

@ -29,12 +29,6 @@
#include "libvirt.h"
#include "libvirt-utils.h"
#ifndef __CYGWIN__
extern PyObject *PyInit_libvirtmod(void);
#else
extern PyObject *PyInit_cygvirtmod(void);
#endif
#if 0
# define DEBUG_ERROR 1
#endif
@ -11227,7 +11221,7 @@ static struct PyModuleDef moduledef = {
NULL
};
PyObject *
PyMODINIT_FUNC
#ifndef __CYGWIN__
PyInit_libvirtmod
#else

View File

@ -25,12 +25,6 @@
# include <fcntl.h>
#endif
#ifndef __CYGWIN__
extern PyObject *PyInit_libvirtmod_qemu(void);
#else
extern PyObject *PyInit_cygvirtmod_qemu(void);
#endif
#if 0
# define DEBUG_ERROR 1
#endif
@ -478,7 +472,7 @@ static struct PyModuleDef moduledef = {
NULL
};
PyObject *
PyMODINIT_FUNC
#ifndef __CYGWIN__
PyInit_libvirtmod_qemu
#else