From: José Fonseca Date: Sun, 20 Feb 2011 09:01:25 +0000 (+0000) Subject: get_function_by_name shortcut X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=eccec3ef1c54bc118acbc8f9c3ce7b2cdaa340c5;p=apitrace get_function_by_name shortcut --- diff --git a/stdapi.py b/stdapi.py index 79df2c3..7d0c982 100644 --- a/stdapi.py +++ b/stdapi.py @@ -543,6 +543,12 @@ class API: def add_interfaces(self, interfaces): self.interfaces.extend(interfaces) + def get_function_by_name(self, name): + for function in self.functions: + if function.name == name: + return function + return None + Bool = Literal("bool", "Bool") SChar = Literal("signed char", "SInt")