From 1d8b52d81d55c3591b887364a6c5723ef4fd5197 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 9 Feb 2006 17:45:11 +0000 Subject: * //* : renamed the project libvirt , this affects all makefiles, the specs, the icons, the docs, etc ... * configure.in: prepare for 0.0.3 Daniel --- libvirt_wrap.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 libvirt_wrap.h (limited to 'libvirt_wrap.h') diff --git a/libvirt_wrap.h b/libvirt_wrap.h new file mode 100644 index 0000000..5d1d3e3 --- /dev/null +++ b/libvirt_wrap.h @@ -0,0 +1,49 @@ +/* + * libvirt_wrap.h: type wrappers for libvir python bindings + * + * Copyright (C) 2005 Red Hat, Inc. + * + * Daniel Veillard + */ + +#include +#include + +#ifdef __GNUC__ +#ifdef ATTRIBUTE_UNUSED +#undef ATTRIBUTE_UNUSED +#endif +#ifndef ATTRIBUTE_UNUSED +#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif /* ATTRIBUTE_UNUSED */ +#else +#define ATTRIBUTE_UNUSED +#endif + +#define PyvirConnect_Get(v) (((v) == Py_None) ? NULL : \ + (((PyvirConnect_Object *)(v))->obj)) + +typedef struct { + PyObject_HEAD + virConnectPtr obj; +} PyvirConnect_Object; + + +#define PyvirDomain_Get(v) (((v) == Py_None) ? NULL : \ + (((PyvirDomain_Object *)(v))->obj)) + +typedef struct { + PyObject_HEAD + virDomainPtr obj; +} PyvirDomain_Object; + + +PyObject * libvirt_intWrap(int val); +PyObject * libvirt_longWrap(long val); +PyObject * libvirt_longlongWrap(long long val); +PyObject * libvirt_charPtrWrap(char *str); +PyObject * libvirt_constcharPtrWrap(const char *str); +PyObject * libvirt_charPtrConstWrap(const char *str); +PyObject * libvirt_virConnectPtrWrap(virConnectPtr node); +PyObject * libvirt_virDomainPtrWrap(virDomainPtr node); + -- cgit