mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
scripts: fix API parsing of *** pointers
The currrent generated API contains *** pointer types with bogus whitespace in the middle: <arg name='keys' type='char ** *' info='pointer to a variable to store authorized keys'/> because the tokenizer only tries to merge 2 distinct '*' together. This refactors the code to merge an arbitrary number, resulting in <arg name='keys' type='char ***' info='pointer to a variable to store authorized keys'/> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
675c222a58
commit
81b63c3d78
@ -603,13 +603,12 @@ class CLexer:
|
|||||||
i = i + 3
|
i = i + 3
|
||||||
continue
|
continue
|
||||||
|
|
||||||
j = i + 1
|
j = i
|
||||||
if j < nline and line[j] in "+-*><=/%&!|":
|
while (j + 1) < nline and line[j+1] in "+-*><=/%&!|":
|
||||||
self.tokens.append(('op', line[i:j + 1]))
|
j = j + 1
|
||||||
i = j + 1
|
|
||||||
else:
|
self.tokens.append(('op', line[i:j+1]))
|
||||||
self.tokens.append(('op', line[i]))
|
i = j + 1
|
||||||
i = i + 1
|
|
||||||
continue
|
continue
|
||||||
s = i
|
s = i
|
||||||
while i < nline:
|
while i < nline:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user