Patchwork [07/21] qapi: generate qapi_free_* functions for *List types

login
register
mail settings
Submitter Luiz Capitulino
Date Sept. 28, 2011, 2:44 p.m.
Message ID <1317221085-5825-8-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/116801/
State New
Headers show

Comments

Luiz Capitulino - Sept. 28, 2011, 2:44 p.m.
From: Michael Roth <mdroth@linux.vnet.ibm.com>

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 scripts/qapi-types.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Anthony Liguori - Sept. 29, 2011, 12:50 p.m.
On 09/28/2011 09:44 AM, Luiz Capitulino wrote:
> From: Michael Roth<mdroth@linux.vnet.ibm.com>
>
> Signed-off-by: Michael Roth<mdroth@linux.vnet.ibm.com>
> Signed-off-by: Luiz Capitulino<lcapitulino@redhat.com>

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>

Regards,

Anthony Liguori

> ---
>   scripts/qapi-types.py |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
> index fc0f7af..4797a70 100644
> --- a/scripts/qapi-types.py
> +++ b/scripts/qapi-types.py
> @@ -254,6 +254,8 @@ for expr in exprs:
>       ret = "\n"
>       if expr.has_key('type'):
>           ret += generate_struct(expr['type'], "", expr['data']) + "\n"
> +        ret += generate_type_cleanup_decl(expr['type'] + "List")
> +        fdef.write(generate_type_cleanup(expr['type'] + "List") + "\n")
>           ret += generate_type_cleanup_decl(expr['type'])
>           fdef.write(generate_type_cleanup(expr['type']) + "\n")
>       elif expr.has_key('union'):

Patch

diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index fc0f7af..4797a70 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -254,6 +254,8 @@  for expr in exprs:
     ret = "\n"
     if expr.has_key('type'):
         ret += generate_struct(expr['type'], "", expr['data']) + "\n"
+        ret += generate_type_cleanup_decl(expr['type'] + "List")
+        fdef.write(generate_type_cleanup(expr['type'] + "List") + "\n")
         ret += generate_type_cleanup_decl(expr['type'])
         fdef.write(generate_type_cleanup(expr['type']) + "\n")
     elif expr.has_key('union'):