qapi: add c_fun to escape function names
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
committed by
Anthony Liguori
parent
cb1977d308
commit
c9da228b49
@@ -131,7 +131,10 @@ def camel_case(name):
|
||||
return new_name
|
||||
|
||||
def c_var(name):
|
||||
return '_'.join(name.split('-')).lstrip("*")
|
||||
return name.replace('-', '_').lstrip("*")
|
||||
|
||||
def c_fun(name):
|
||||
return c_var(name).replace('.', '_')
|
||||
|
||||
def c_list_type(name):
|
||||
return '%sList' % name
|
||||
|
Reference in New Issue
Block a user