[gi-docgen/check-ignore: 4/6] generate: Function macro arguments have no C type
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/check-ignore: 4/6] generate: Function macro arguments have no C type
- Date: Fri, 11 Jun 2021 12:52:40 +0000 (UTC)
commit b01648686383c63b0c5cc69059cd5d429cb8516a
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jun 11 13:38:23 2021 +0100
generate: Function macro arguments have no C type
Sadly, g-ir-scanner won't even respect a (type) annotation, so right now
everything looks like `void`.
gidocgen/gdgenerate.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gidocgen/gdgenerate.py b/gidocgen/gdgenerate.py
index 7f6153d..635fa63 100644
--- a/gidocgen/gdgenerate.py
+++ b/gidocgen/gdgenerate.py
@@ -444,9 +444,12 @@ class TemplateArgument:
def __init__(self, namespace, call, argument):
self.name = argument.name
self.type_name = argument.target.name
- self.type_cname = argument.target.ctype
- if self.type_cname is None:
- self.type_cname = type_name_to_cname(argument.target.name, True)
+ if isinstance(call, gir.FunctionMacro):
+ self.type_cname = '-'
+ else:
+ self.type_cname = argument.target.ctype
+ if self.type_cname is None:
+ self.type_cname = type_name_to_cname(argument.target.name, True)
self.is_array = isinstance(argument.target, gir.ArrayType)
self.is_list = isinstance(argument.target, gir.ListType)
self.is_map = isinstance(argument.target, gir.MapType)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]