diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2008-11-19 16:24:01 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2008-11-19 16:24:01 +0000 |
commit | 1235fc187b9bc4bfa03be9661080c21172691c80 (patch) | |
tree | 0bdc81205c8cf2197463583f2bf8f834f84cf217 /types.c | |
parent | 16ba89098961d5be83f88a8b0db06c47414e967e (diff) | |
download | libvirt-python-v6-1235fc187b9bc4bfa03be9661080c21172691c80.tar.gz libvirt-python-v6-1235fc187b9bc4bfa03be9661080c21172691c80.tar.xz libvirt-python-v6-1235fc187b9bc4bfa03be9661080c21172691c80.zip |
Add a virFreeCallback to event loop APIs
Diffstat (limited to 'types.c')
-rw-r--r-- | types.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -196,6 +196,22 @@ libvirt_virEventTimeoutCallbackWrap(virEventTimeoutCallback node) } PyObject * +libvirt_virFreeCallbackWrap(virFreeCallback 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 *) "virFreeCallback", + NULL); + return (ret); +} + +PyObject * libvirt_virVoidPtrWrap(void* node) { PyObject *ret; |