diff options
author | Jack Lloyd <[email protected]> | 2019-04-19 06:38:09 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-04-19 06:38:09 -0400 |
commit | 0e931e8beee767297ed4f660970dfffc561ff312 (patch) | |
tree | fa7bfd0b63c74ddc3bd89f5ecdbc87f3cdd57020 /src/scripts | |
parent | a14c2d35678257783348180cb043b3698f280a6d (diff) |
Decls
Diffstat (limited to 'src/scripts')
-rwxr-xr-x | src/scripts/ffi_decls.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scripts/ffi_decls.py b/src/scripts/ffi_decls.py index 70bd8e2cf..9610c82cc 100755 --- a/src/scripts/ffi_decls.py +++ b/src/scripts/ffi_decls.py @@ -64,7 +64,7 @@ class FuncDefVisitor(c_ast.NodeVisitor): # all functions returning ints: fn_name = node.type.declname - fn_args = [fn_name] + fn_args = [] for param in node.args.params: @@ -82,7 +82,10 @@ class FuncDefVisitor(c_ast.NodeVisitor): ctype = to_ctype(typ, is_ptr) fn_args.append(ctype) - print(fn_args) + if len(fn_args) > 4: + print(" ffi_api(_dll.%s,\n %s)" % (fn_name, fn_args)) + else: + print(" ffi_api(_dll.%s, %s)" % (fn_name, fn_args)) ast = parse_file(ffi_header, use_cpp=True, cpp_args=['-Ibuild/include', '-std=c89', '-DBOTAN_DLL=']) v = FuncDefVisitor() |