mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-03-11 16:58:17 +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:
parent
a6b8929083
commit
39b7773d32
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user