diff options
author | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2015-07-15 13:11:45 +0200 |
---|---|---|
committer | Mathieu Duponchelle <mathieu@centricular.com> | 2019-07-19 01:21:38 +0200 |
commit | 0f3efc9058e2f249e84c02840fd96b6a413a9201 (patch) | |
tree | ea4628119b6573901c3426a16a74fced1c9c7822 /giscanner/ast.py | |
parent | a62855702c3bc0b10370ef25d622a32e227283bd (diff) | |
download | gobject-introspection-0f3efc9058e2f249e84c02840fd96b6a413a9201.tar.gz |
scanner: parse and expose function macros
This is useful for documentation tools, and other utilities that
rely on full introspection of the C API of a given library.
Diffstat (limited to 'giscanner/ast.py')
-rw-r--r-- | giscanner/ast.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py index 2daccdfb..66fe0cf1 100644 --- a/giscanner/ast.py +++ b/giscanner/ast.py @@ -728,6 +728,14 @@ class Callable(Node): raise ValueError("Unknown argument %s" % (name, )) +class FunctionMacro(Node): + def __init__(self, name, parameters, symbol): + Node.__init__(self, name) + self.symbol = symbol + self.parameters = parameters + self.introspectable = False + + class Function(Callable): def __init__(self, name, retval, parameters, throws, symbol): @@ -868,7 +876,7 @@ class TypeContainer(Annotated): self.direction = direction if transfer is not None: self.transfer = transfer - elif typenode.is_const: + elif typenode and typenode.is_const: self.transfer = PARAM_TRANSFER_NONE else: self.transfer = None |