summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2015-07-23 18:00:41 +0200
committerJeremy Allison <jra@samba.org>2015-07-31 01:55:32 +0200
commitca861f2b7302c9c96b42843de68ae8f9bf77466e (patch)
tree9c29781e9af9eef2d01220d155df5e3d309b100a /script
parent99d0c3b0dc8ffc064bd5ae31a59ed0eae56bea96 (diff)
downloadsamba-ca861f2b7302c9c96b42843de68ae8f9bf77466e.tar.gz
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>
Diffstat (limited to 'script')
-rw-r--r--script/generate_param.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/script/generate_param.py b/script/generate_param.py
index 351ea6bbb40..494e23972a2 100644
--- a/script/generate_param.py
+++ b/script/generate_param.py
@@ -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')