Handle rdcstrpair or rdcstrpairs in function return types for docstrings

This commit is contained in:
baldurk
2021-05-17 15:05:13 +01:00
parent d8d6557feb
commit 16b82d1689
+4
View File
@@ -96,6 +96,10 @@ def make_c_type(ret: str, pattern: bool, typelist: List[str]):
ret = 'float|double' if pattern else 'float'
elif ret == 'bytes':
ret = '(const )?bytebuf ?[&*]?' if pattern else 'bytebuf'
elif ret == 'List[Tuple[str,str]]': # special case
ret = 'rdcstrpairs'
elif ret == 'Tuple[str,str]': # special case
ret = 'rdcstrpair'
elif ret[0:5] == 'List[':
inner = make_c_type(ret[5:-1], pattern, typelist)
ret = '(const )?rdcarray<{}> ?[&*]?'.format(inner) if pattern else 'rdcarray<{}>'.format(inner)