diff options
author | Daniel Veillard <veillard@redhat.com> | 2006-01-28 20:24:55 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2006-01-28 20:24:55 +0000 |
commit | 0955d746e83c9af235aec6f4c2cb568e6ab4f1ac (patch) | |
tree | 02b7558447f91e0ffe8b21c760c71fbc4412aec7 /libvir.c | |
parent | 84d41f587752e3b6f55524cd34b81a1c7124903f (diff) | |
download | libvirt-python-v6-0955d746e83c9af235aec6f4c2cb568e6ab4f1ac.tar.gz libvirt-python-v6-0955d746e83c9af235aec6f4c2cb568e6ab4f1ac.tar.xz libvirt-python-v6-0955d746e83c9af235aec6f4c2cb568e6ab4f1ac.zip |
* python/libvir.c: fix a stupid bug in python bindings (DomainDestroyv0.0.2LIBVIR_0_0_2
is still mishandled though)
Daniel
Diffstat (limited to 'libvir.c')
-rw-r--r-- | libvir.c | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -16,6 +16,38 @@ void initlibvirmod(void); +static PyObject * +libvir_virDomainFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; + virDomainPtr domain; + PyObject *pyobj_domain; + + if (!PyArg_ParseTuple(args, (char *)"O:virDomainFree", &pyobj_domain)) + return(NULL); + domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain); + + c_retval = virDomainFree(domain); + py_retval = libvir_intWrap((int) c_retval); + return(py_retval); +} + +static PyObject * +libvir_virConnectClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + int c_retval; + virConnectPtr conn; + PyObject *pyobj_conn; + + if (!PyArg_ParseTuple(args, (char *)"O:virConnectClose", &pyobj_conn)) + return(NULL); + conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn); + + c_retval = virConnectClose(conn); + py_retval = libvir_intWrap((int) c_retval); + return(py_retval); +} + /************************************************************************ * * * The registration stuff * @@ -23,6 +55,8 @@ void initlibvirmod(void); ************************************************************************/ static PyMethodDef libvirMethods[] = { #include "libvir-export.c" + {(char *) "virDomainFree", libvir_virDomainFree, METH_VARARGS, NULL}, + {(char *) "virConnectClose", libvir_virConnectClose, METH_VARARGS, NULL}, {NULL, NULL, 0, NULL} }; |