diff options
author | Daniel Veillard <veillard@redhat.com> | 2008-10-31 10:13:45 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2008-10-31 10:13:45 +0000 |
commit | 000818421b5007e1ee65c3fa8fef12bcf08feea2 (patch) | |
tree | 2dfd825507d5c75d1ee393bf229706f48dcf2f56 /types.c | |
parent | 494cd4b4c291391cc5f4f3c20e4f60667c1dd2fb (diff) | |
download | libvirt-python-v6-000818421b5007e1ee65c3fa8fef12bcf08feea2.tar.gz libvirt-python-v6-000818421b5007e1ee65c3fa8fef12bcf08feea2.tar.xz libvirt-python-v6-000818421b5007e1ee65c3fa8fef12bcf08feea2.zip |
* python/Makefile.am python/generator.py python/libvir.c
python/libvir.py python/libvirt_wrap.h python/types.c:
adds support for events from the python bindings, also
improves the generator allowing to embbed per function
definition files, patch by Ben Guthro
* examples/domain-events/events-python/event-test.py: also
adds a programming example
Daniel
Diffstat (limited to 'types.c')
-rw-r--r-- | types.c | 47 |
1 files changed, 47 insertions, 0 deletions
@@ -162,3 +162,50 @@ libvirt_virConnectPtrWrap(virConnectPtr node) NULL); return (ret); } + +PyObject * +libvirt_virEventHandleCallbackWrap(virEventHandleCallback node) +{ + PyObject *ret; + + if (node == NULL) { + Py_INCREF(Py_None); + printf("%s: WARNING - Wrapping None\n", __FUNCTION__); + return (Py_None); + } + ret = + PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "virEventHandleCallback", + NULL); + return (ret); +} + +PyObject * +libvirt_virEventTimeoutCallbackWrap(virEventTimeoutCallback node) +{ + PyObject *ret; + + if (node == NULL) { + printf("%s: WARNING - Wrapping None\n", __FUNCTION__); + Py_INCREF(Py_None); + return (Py_None); + } + ret = + PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "virEventTimeoutCallback", + NULL); + return (ret); +} + +PyObject * +libvirt_virVoidPtrWrap(void* node) +{ + PyObject *ret; + + if (node == NULL) { + Py_INCREF(Py_None); + return (Py_None); + } + ret = + PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "void*", + NULL); + return (ret); +} |