diff options
author | Michael Roth <mdroth@linux.vnet.ibm.com> | 2011-07-19 14:50:35 -0500 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@gmail.com> | 2011-07-21 16:48:13 -0300 |
commit | d5f3c29cf8d59fad4f3c657fc0a26510043bec65 (patch) | |
tree | b01471f3cb503f6ecc991398c6819347a75b8ae4 /qapi/qapi-dealloc-visitor.h | |
parent | e4e6aa14ed377d808aba4643cd922403606d4dee (diff) |
qapi: add QAPI dealloc visitor
Type of Visitor class that can be passed into a qapi-generated C
type's visitor function to free() any heap-allocated data types.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
Diffstat (limited to 'qapi/qapi-dealloc-visitor.h')
-rw-r--r-- | qapi/qapi-dealloc-visitor.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/qapi/qapi-dealloc-visitor.h b/qapi/qapi-dealloc-visitor.h new file mode 100644 index 0000000000..5842bc79bd --- /dev/null +++ b/qapi/qapi-dealloc-visitor.h @@ -0,0 +1,26 @@ +/* + * Dealloc Visitor + * + * Copyright IBM, Corp. 2011 + * + * Authors: + * Michael Roth <mdroth@linux.vnet.ibm.com> + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. + * See the COPYING.LIB file in the top-level directory. + * + */ + +#ifndef QAPI_DEALLOC_VISITOR_H +#define QAPI_DEALLOC_VISITOR_H + +#include "qapi-visit-core.h" + +typedef struct QapiDeallocVisitor QapiDeallocVisitor; + +QapiDeallocVisitor *qapi_dealloc_visitor_new(void); +void qapi_dealloc_visitor_cleanup(QapiDeallocVisitor *d); + +Visitor *qapi_dealloc_get_visitor(QapiDeallocVisitor *v); + +#endif |