summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2015-12-07 00:16:07 -0800
committerrockon999 <rockon999@users.noreply.github.com>2018-08-06 02:53:45 -0500
commitdbcc0f8af23ccd385a1edd888034e79c47908520 (patch)
tree2511951796cd180a871e2794fe2e425352437ea5
parent83a986e6be0742561187ee69affc158968442f75 (diff)
downloadgobject-introspection-dbcc0f8af23ccd385a1edd888034e79c47908520.tar.gz
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.)
-rw-r--r--giscanner/docwriter.py2
1 files changed, 2 insertions, 0 deletions
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):