[gi-docgen/ebassi/gpointer-is-pointer] generate: gpointer is a pointer
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen/ebassi/gpointer-is-pointer] generate: gpointer is a pointer
- Date: Wed, 9 Feb 2022 15:20:32 +0000 (UTC)
commit 8c29d948c815d57565c6c2f83d6cbe85bc8237d1
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Feb 9 15:18:39 2022 +0000
generate: gpointer is a pointer
We need to special case gpointer and gconstpointer when deciding if a
C type is a pointer type.
Fixes: #127
gidocgen/gdgenerate.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gidocgen/gdgenerate.py b/gidocgen/gdgenerate.py
index 1e4099f..8e08a0e 100644
--- a/gidocgen/gdgenerate.py
+++ b/gidocgen/gdgenerate.py
@@ -642,6 +642,8 @@ class TemplateArgument:
return False
if self.direction in ['out', 'inout'] and self.is_fundamental and self.type_cname.count('*') == 1:
return False
+ if self.is_fundamental and self.type_cname in ['gpointer', 'gconstpointer']:
+ return True
return '*' in self.type_cname
@property
@@ -723,7 +725,10 @@ class TemplateReturnValue:
def is_pointer(self):
if self.type_cname is None:
return False
- return '*' in self.type_cname
+ elif self.is_fundamental and self.type_cname in ['gpointer', 'gconstpointer']:
+ return True
+ else:
+ return '*' in self.type_cname
class TemplateSignal:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]