
2010/8/30 Eric Blake <eblake@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