summaryrefslogtreecommitdiffstats
path: root/typewrappers.h
diff options
context:
space:
mode:
authorGuannan Ren <gren@redhat.com>2012-03-28 09:41:04 -0600
committerDaniel Veillard <veillard@redhat.com>2012-04-05 11:37:43 +0800
commit804d6c4cf70f1884902f5cf3f9273e3e68c5ed7d (patch)
treebb14f650dbc8ac0ce4e6d680f3cbd50f86b7f032 /typewrappers.h
parent058d05bb617cb48b21967e4c57e8a3d09ddc75e0 (diff)
downloadlibvirt-python-v6-804d6c4cf70f1884902f5cf3f9273e3e68c5ed7d.tar.gz
libvirt-python-v6-804d6c4cf70f1884902f5cf3f9273e3e68c5ed7d.tar.xz
libvirt-python-v6-804d6c4cf70f1884902f5cf3f9273e3e68c5ed7d.zip
python: Add new helper functions for python to C integral conversion
https://bugzilla.redhat.com/show_bug.cgi?id=807751 int libvirt_intUnwrap(PyObject *obj, int *val); int libvirt_uintUnwrap(PyObject *obj, unsigned int *val); int libvirt_longUnwrap(PyObject *obj, long *val); int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val); int libvirt_longlongUnwrap(PyObject *obj, long long *val); int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val); int libvirt_doubleUnwrap(PyObject *obj, double *val); int libvirt_boolUnwrap(PyObject *obj, bool *val); (cherry picked from commit 384ebd3fc5deec035d6894352a25fd2b7f637cf0)
Diffstat (limited to 'typewrappers.h')
-rw-r--r--typewrappers.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/typewrappers.h b/typewrappers.h
index 1e34dfa..af68bce 100644
--- a/typewrappers.h
+++ b/typewrappers.h
@@ -7,6 +7,7 @@
*/
#include <Python.h>
+#include <stdbool.h>
#include "libvirt/libvirt.h"
#include "libvirt/virterror.h"
@@ -163,6 +164,14 @@ PyObject * libvirt_ulonglongWrap(unsigned long long val);
PyObject * libvirt_charPtrWrap(char *str);
PyObject * libvirt_charPtrSizeWrap(char *str, Py_ssize_t size);
PyObject * libvirt_constcharPtrWrap(const char *str);
+int libvirt_intUnwrap(PyObject *obj, int *val);
+int libvirt_uintUnwrap(PyObject *obj, unsigned int *val);
+int libvirt_longUnwrap(PyObject *obj, long *val);
+int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val);
+int libvirt_longlongUnwrap(PyObject *obj, long long *val);
+int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val);
+int libvirt_doubleUnwrap(PyObject *obj, double *val);
+int libvirt_boolUnwrap(PyObject *obj, bool *val);
PyObject * libvirt_virConnectPtrWrap(virConnectPtr node);
PyObject * libvirt_virDomainPtrWrap(virDomainPtr node);
PyObject * libvirt_virNetworkPtrWrap(virNetworkPtr node);