diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2016-01-29 16:52:56 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2016-01-29 16:52:56 -0800 |
commit | 11b87bfb2a885824350d76332de7e1ddb488cd67 (patch) | |
tree | d9d363266f46e4be61819077cce9bc978c968c6b /tools/buildgen | |
parent | 905821b529d702c3daf3f314ee57a95e70ca7ac7 (diff) |
Usable API list
Diffstat (limited to 'tools/buildgen')
-rwxr-xr-x | tools/buildgen/plugins/list_api.py (renamed from tools/buildgen/plugins/c_api.py) | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/buildgen/plugins/c_api.py b/tools/buildgen/plugins/list_api.py index bb7bf37600..3a8eec113c 100755 --- a/tools/buildgen/plugins/c_api.py +++ b/tools/buildgen/plugins/list_api.py @@ -53,12 +53,14 @@ def list_c_apis(filenames): type_end = max(last_space, last_star) return_type = type_and_name[0:type_end+1].strip() name = type_and_name[type_end+1:].strip() - yield {'return_type': return_type, 'name': name, 'arguments': args} + yield {'return_type': return_type, 'name': name, 'arguments': args, 'header': filename} def mako_plugin(dictionary): apis = [] - # TODO(ctiller): find grpc library, iterate headers, append apis to dictionary + for lib in dictionary['libs']: + if lib['name'] == 'grpc': + apis.extend(list_c_apis(lib['public_headers'])) dictionary['c_apis'] = apis @@ -70,7 +72,5 @@ def headers_under(directory): if __name__ == '__main__': - apis = [{'name': api.name, 'return_type': api.return_type, 'args': api.arguments} - for api in list_c_apis(headers_under('include/grpc'))] - print yaml.dump(apis) + print yaml.dump([api for api in list_c_apis(headers_under('include/grpc'))]) |