summaryrefslogtreecommitdiff
path: root/giscanner/transformer.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r--giscanner/transformer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index a3cf3126..f63894cb 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -459,6 +459,10 @@ raise ValueError."""
def _create_function_macro(self, symbol):
if symbol.ident.startswith('_'):
return None
+
+ if (symbol.source_filename is None or not symbol.source_filename.endswith('.h')):
+ return None
+
parameters = list(self._create_parameters(symbol, symbol.base_type))
name = self._strip_symbol(symbol)
macro = ast.FunctionMacro(name, parameters, symbol.ident)