mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-11-08 00:24:52 +03:00
Fri Nov 30 11:04:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* python/libvir.c, python/libvir.py: Make Python aware that the C bindings module is called cygvirtmod.dll when compiled by CYGWIN. * python/Makefile.am: Remove symlink libvirtmod.dll -> cygvirtmod.dll no longer necessary because of the above. * configure.in: Remove AM_CONDITIONAL(CYGWIN).
This commit is contained in:
@@ -15,7 +15,11 @@
|
||||
#include "libvirt_wrap.h"
|
||||
#include "libvirt-py.h"
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
extern void initlibvirtmod(void);
|
||||
#else
|
||||
extern void initcygvirtmod(void);
|
||||
#endif
|
||||
|
||||
PyObject *libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
|
||||
PyObject *libvirt_virNetworkGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
|
||||
@@ -752,7 +756,12 @@ static PyMethodDef libvirtMethods[] = {
|
||||
};
|
||||
|
||||
void
|
||||
initlibvirtmod(void)
|
||||
#ifndef __CYGWIN__
|
||||
initlibvirtmod
|
||||
#else
|
||||
initcygvirtmod
|
||||
#endif
|
||||
(void)
|
||||
{
|
||||
static int initialized = 0;
|
||||
|
||||
@@ -762,7 +771,13 @@ initlibvirtmod(void)
|
||||
virInitialize();
|
||||
|
||||
/* intialize the python extension module */
|
||||
Py_InitModule((char *) "libvirtmod", libvirtMethods);
|
||||
Py_InitModule((char *)
|
||||
#ifndef __CYGWIN__
|
||||
"libvirtmod"
|
||||
#else
|
||||
"cygvirtmod"
|
||||
#endif
|
||||
, libvirtMethods);
|
||||
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user