1 Sep 2010 17:32
Re: [libvirt] [PATCH] esx: Fix generator for string return values
Matthias Bolte <matthias.bolte <at> googlemail.com>
2010-09-01 15:32:20 GMT
2010-09-01 15:32:20 GMT
2010/8/30 Eric Blake <eblake <at> redhat.com>: > On 08/29/2010 05:00 PM, Matthias Bolte wrote: >> >> Distinguish between strings as parameters (const char *) >> and strings as return values (char **). > > Here, you mention char**, > >> if self.type == "String" and \ >> self.occurrence not in [OCCURRENCE__REQUIRED_LIST, >> OCCURRENCE__OPTIONAL_LIST]: >> - return "const char *" >> + if self.is_return_value: >> + return "char *" > > But here, it is only char*. Which is it? That's a bit tricky. In case Parameter.get_type_string() is called from Parameter.generate_return() then string += "%s*%s)%s" % (self.get_type_string(), self.name, end_of_line) in line 104 adds the second *. I attached v2 where this is simplified. Matthias
(Continue reading)
RSS Feed