mirror of
https://github.com/samba-team/samba.git
synced 2025-03-04 16:58:42 +03:00
generate_param: more uniform formatting of various type dicts
This allows for easier extension later on (patch context-wise). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
99d0c3b0dc
commit
ca861f2b73
@ -89,9 +89,15 @@ def iterate_all(path):
|
||||
|
||||
# map doc attributes to a section of the generated function
|
||||
context_dict = {"G": "_GLOBAL", "S": "_LOCAL"}
|
||||
param_type_dict = {"boolean": "_BOOL", "list": "_LIST", "string": "_STRING",
|
||||
"integer": "_INTEGER", "enum": "_INTEGER", "char" : "_CHAR",
|
||||
"boolean-auto": "_INTEGER"}
|
||||
param_type_dict = {
|
||||
"boolean" : "_BOOL",
|
||||
"list" : "_LIST",
|
||||
"string" : "_STRING",
|
||||
"integer" : "_INTEGER",
|
||||
"enum" : "_INTEGER",
|
||||
"char" : "_CHAR",
|
||||
"boolean-auto" : "_INTEGER",
|
||||
}
|
||||
|
||||
def generate_functions(path_in, path_out):
|
||||
f = open(path_out, 'w')
|
||||
@ -123,8 +129,15 @@ def generate_functions(path_in, path_out):
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
mapping = {'boolean': 'bool ', 'string': 'char *', 'integer': 'int ', 'char': 'char ',
|
||||
'list': 'const char **', 'enum': 'int ', 'boolean-auto': 'int '}
|
||||
mapping = {
|
||||
'boolean' : 'bool ',
|
||||
'string' : 'char *',
|
||||
'integer' : 'int ',
|
||||
'char' : 'char ',
|
||||
'list' : 'const char **',
|
||||
'enum' : 'int ',
|
||||
'boolean-auto' : 'int ',
|
||||
}
|
||||
|
||||
def make_s3_param_proto(path_in, path_out):
|
||||
file_out = open(path_out, 'w')
|
||||
|
Loading…
x
Reference in New Issue
Block a user