summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cvsignore1
-rw-r--r--Makefile.am4
-rw-r--r--libvir.c6
-rw-r--r--libvirt_wrap.h2
4 files changed, 8 insertions, 5 deletions
diff --git a/.cvsignore b/.cvsignore
index 77c04da..7478275 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -4,6 +4,7 @@ Makefile.in
.libs
*.lo
*.la
+*.loT
libvirt.py
libvirt-export.c
libvirtclass.txt
diff --git a/Makefile.am b/Makefile.am
index d8ffd14..dbb471d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,7 +33,9 @@ all-local: libvirt.py
python_LTLIBRARIES = libvirtmod.la
libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
-libvirtmod_la_LIBADD = $(mylibs)
+libvirtmod_la_LIBADD = $(mylibs)
+# Python header files contain a redundant decl, hence:
+libvirtmod_la_CFLAGS = -Wno-redundant-decls
libvirt.py: $(srcdir)/libvir.py libvirtclass.py
cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py
diff --git a/libvir.c b/libvir.c
index 50a4424..d0e6ee7 100644
--- a/libvir.c
+++ b/libvir.c
@@ -15,7 +15,7 @@
#include "libvirt_wrap.h"
#include "libvirt-py.h"
-void initlibvirmod(void);
+extern void initlibvirtmod(void);
PyObject *libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
PyObject *libvirt_virGetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
@@ -266,7 +266,7 @@ libvirt_virConnectListDefinedDomains(PyObject *self ATTRIBUTE_UNUSED,
Py_INCREF(Py_None);
return (Py_None);
}
- c_retval = virConnectListDefinedDomains(conn, (const char **)names, c_retval);
+ c_retval = virConnectListDefinedDomains(conn, names, c_retval);
if (c_retval < 0) {
free(names);
Py_INCREF(Py_None);
@@ -375,7 +375,7 @@ libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return(py_retval);
}
-PyObject *
+static PyObject *
libvirt_virDomainLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
virDomainPtr c_retval;
diff --git a/libvirt_wrap.h b/libvirt_wrap.h
index 8bcfdb3..547dc6d 100644
--- a/libvirt_wrap.h
+++ b/libvirt_wrap.h
@@ -90,7 +90,7 @@ PyObject * libvirt_virDomainPtrWrap(virDomainPtr node);
#define LIBVIRT_ENSURE_THREAD_STATE \
LIBVIRT_STMT_START { \
- PyGILState_STATE _save; \
+ PyGILState_STATE _save = PyGILState_UNLOCKED; \
if (PyEval_ThreadsInitialized()) \
_save = PyGILState_Ensure();