mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-11-09 04:24:18 +03:00
* 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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user