|
|
@ -62,23 +62,26 @@ def _generate_functions(acid): |
|
|
|
for subitem in subitems: |
|
|
|
subitems_str += tmpl_sub.format(type=subitem["type"], name=subitem["name"]) + "\n" |
|
|
|
|
|
|
|
#e.g: (PEP_STATUS(*)(void*,const char*,const char*,const char*,const char*,const char*)) |
|
|
|
sig_ret = item["result_type"] + "(*)" |
|
|
|
sig_parms = "" |
|
|
|
|
|
|
|
for subitem in subitems: |
|
|
|
# TODO: utter PEP-HACK!!!! FIXME! |
|
|
|
type = subitem["type"] |
|
|
|
if type == "PEP_SESSION": |
|
|
|
type = "void *" |
|
|
|
|
|
|
|
sig_parms += type + ", " |
|
|
|
|
|
|
|
sig_parms = sig_parms[:-2] |
|
|
|
|
|
|
|
sig_str = "(" + sig_ret + "(" +sig_parms + "))" |
|
|
|
|
|
|
|
ret += tmpl_main.format(name=item["name"], return_type=item["result_type"], sig=sig_str, subitems=subitems_str) |
|
|
|
# Signature |
|
|
|
# #e.g: (PEP_STATUS(*)(void*,const char*,const char*,const char*,const char*,const char*)) |
|
|
|
# sig_ret = item["result_type"] + "(*)" |
|
|
|
# sig_parms = "" |
|
|
|
# |
|
|
|
# for subitem in subitems: |
|
|
|
# # TODO: utter PEP-HACK!!!! FIXME! |
|
|
|
# type = subitem["type"] |
|
|
|
# if type == "PEP_SESSION": |
|
|
|
# type = "void *" |
|
|
|
# |
|
|
|
# sig_parms += type + ", " |
|
|
|
# |
|
|
|
# sig_parms = sig_parms[:-2] |
|
|
|
# |
|
|
|
# sig_str = "(" + sig_ret + "(" +sig_parms + "))" |
|
|
|
# ret += tmpl_main.format(name=item["name"], return_type=item["result_type"], sig=sig_str, subitems=subitems_str) |
|
|
|
|
|
|
|
|
|
|
|
ret += tmpl_main.format(name=item["name"], return_type=item["result_type"], subitems=subitems_str) |
|
|
|
|
|
|
|
return ret |
|
|
|
|
|
|
|