* python/*: update of the python bindings, fix names, add
[libvirt-python/ericb.git] / libvir_wrap.h
blob41400c06ac87ebd54ce7c5a79f72ccc3d94125a8
1 /*
2 * libvir_wrap.h: type wrappers for libvir python bindings
4 * Copyright (C) 2005 Red Hat, Inc.
6 * Daniel Veillard <veillard@redhat.com>
7 */
9 #include <Python.h>
10 #include <libvir.h>
12 #ifdef __GNUC__
13 #ifdef ATTRIBUTE_UNUSED
14 #undef ATTRIBUTE_UNUSED
15 #endif
16 #ifndef ATTRIBUTE_UNUSED
17 #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
18 #endif /* ATTRIBUTE_UNUSED */
19 #else
20 #define ATTRIBUTE_UNUSED
21 #endif
23 #define PyvirConnect_Get(v) (((v) == Py_None) ? NULL : \
24 (((PyvirConnect_Object *)(v))->obj))
26 typedef struct {
27 PyObject_HEAD
28 virConnectPtr obj;
29 } PyvirConnect_Object;
32 #define PyvirDomain_Get(v) (((v) == Py_None) ? NULL : \
33 (((PyvirDomain_Object *)(v))->obj))
35 typedef struct {
36 PyObject_HEAD
37 virDomainPtr obj;
38 } PyvirDomain_Object;
41 PyObject * libvir_intWrap(int val);
42 PyObject * libvir_longWrap(long val);
43 PyObject * libvir_longlongWrap(long long val);
44 PyObject * libvir_charPtrWrap(char *str);
45 PyObject * libvir_constcharPtrWrap(const char *str);
46 PyObject * libvir_charPtrConstWrap(const char *str);
47 PyObject * libvir_virConnectPtrWrap(virConnectPtr node);
48 PyObject * libvir_virDomainPtrWrap(virDomainPtr node);