mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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>
This commit is contained in:
committed by
Luiz Capitulino
parent
e4e6aa14ed
commit
d5f3c29cf8
26
qapi/qapi-dealloc-visitor.h
Normal file
26
qapi/qapi-dealloc-visitor.h
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user