[gobject-introspection: 11/30] docwriter: Handle moved_to in underscore function
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection: 11/30] docwriter: Handle moved_to in underscore function
- Date: Tue, 14 Aug 2018 07:04:55 +0000 (UTC)
commit dbcc0f8af23ccd385a1edd888034e79c47908520
Author: Philip Chimento <philip chimento gmail com>
Date: Mon Dec 7 00:16:07 2015 -0800
docwriter: Handle moved_to in underscore function
This function was failing on g_iconv() which has a blank name in the GIR
file (its name instead coming from the moved-to attribute.)
giscanner/docwriter.py | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py
index 0d55936c..35ba6f1c 100644
--- a/giscanner/docwriter.py
+++ b/giscanner/docwriter.py
@@ -506,6 +506,8 @@ class DocFormatter(object):
return node.name.replace('-', '_')
elif node.name:
return to_underscores(node.name)
+ elif isinstance(node, ast.Function) and node.moved_to:
+ return to_underscores(node.moved_to)
elif isinstance(node, ast.Callback):
return 'callback'
elif isinstance(node, ast.Union):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]