<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font face="Times New Roman" size="3">Thanks ! <br id="FontBreak"></font><br> <BR><div><div id="SkyDrivePlaceholder"></div>> Date: Wed, 1 May 2013 14:27:08 +0200<br>> Subject: Re: [libvirt] [PATCH] ESX: Fix DISPATCH_FREE generation code to free all extended objects<br>> From: matthias.bolte@googlemail.com<br>> To: ata.husain@hotmail.com<br>> CC: libvir-list@redhat.com<br>> <br>> 2013/1/2 Ata E Husain Bohra <ata.husain@hotmail.com>:<br>> > Python code generator "generate_source" section that handles<br>> > code generation to "free" inherited objects needs to generate<br>> > DISPATCH_FREE calls for all extended_by objects.<br>> > ---<br>> >  src/esx/esx_vi_generator.py |   21 ++++++++++++++++++---<br>> >  1 file changed, 18 insertions(+), 3 deletions(-)<br>> ><br>> > diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py<br>> > index af4e7e8..7a7cf76 100755<br>> > --- a/src/esx/esx_vi_generator.py<br>> > +++ b/src/esx/esx_vi_generator.py<br>> > @@ -4,6 +4,7 @@<br>> >  # esx_vi_generator.py: generates most of the SOAP type mapping code<br>> >  #<br>> >  # Copyright (C) 2010-2012 Matthias Bolte <matthias.bolte@googlemail.com><br>> > +# Copyright (C) 2013 Ata E Husain Bohra <ata.husain@hotmail.com><br>> >  #<br>> >  # This library is free software; you can redistribute it and/or<br>> >  # modify it under the terms of the GNU Lesser General Public<br>> > @@ -785,9 +786,7 @@ class Object(Type):<br>> >              source += "ESX_VI__TEMPLATE__DYNAMIC_FREE(%s,\n" % self.name<br>> >              source += "{\n"<br>> ><br>> > -            for extended_by in self.extended_by:<br>> > -                source += "    ESX_VI__TEMPLATE__DISPATCH__FREE(%s)\n" \<br>> > -                          % extended_by<br>> > +            source += recurse_dispatch(self, "ESX_VI__TEMPLATE__DISPATCH__FREE")<br>> ><br>> >              source += "},\n"<br>> >              source += "{\n"<br>> <br>> ACK for the general idea of the fix, but there is already a<br>> generate_dispatch function that does what you reimplemented in<br>> recurse_dispatch.<br>> <br>> I removed recurse_dispatch, replaced the call to it with a call to<br>> generate_dispatch and pushed the result.<br>> <br>> --<br>> Matthias Bolte<br>> http://photron.blogspot.com<br></div>                                       </div></body>
</html>