diff options
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r-- | scripts/qapi.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 86e96089af..dc690bbf0e 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -470,8 +470,10 @@ def find_enum(name): def is_enum(name): return find_enum(name) != None -def c_type(name): +def c_type(name, is_param=False): if name == 'str': + if is_param: + return 'const char *' return 'char *' elif name == 'int': return 'int64_t' |