summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2018-02-09 14:03:48 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2018-02-09 14:03:48 +0000
commit6ada03c8ad2a12ecff6448bb26c3ece3afe433c0 (patch)
tree1321e2fb20653678c29457517da0aa590a0101f1
parent31ab9496cb882a21a1b64b1ef39f06514073dea5 (diff)
parent4bfdc83b063bce3821b09e88e5ee3207a10259d2 (diff)
downloadgobject-introspection-6ada03c8ad2a12ecff6448bb26c3ece3afe433c0.tar.gz
Merge branch 'preserve-complete-ctype' into 'master'
Preserve complete_ctype when using type from annotation. Closes #190 See merge request GNOME/gobject-introspection!5
-rw-r--r--giscanner/maintransformer.py1
-rw-r--r--tests/scanner/Regress-1.0-C-expected/Regress.annotation_set_source_file.page4
-rw-r--r--tests/scanner/Regress-1.0-expected.gir2
3 files changed, 4 insertions, 3 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 23ed4102..275f1c08 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -330,6 +330,7 @@ class MainTransformer(object):
# might lose the ctype from the original node.
if type_node is not None:
result.ctype = type_node.ctype
+ result.complete_ctype = type_node.complete_ctype
return result
def _get_position(self, func, param):
diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.annotation_set_source_file.page b/tests/scanner/Regress-1.0-C-expected/Regress.annotation_set_source_file.page
index 2f7fb864..5d8197a2 100644
--- a/tests/scanner/Regress-1.0-C-expected/Regress.annotation_set_source_file.page
+++ b/tests/scanner/Regress-1.0-C-expected/Regress.annotation_set_source_file.page
@@ -13,14 +13,14 @@
</api:returns>
<api:name>regress_annotation_set_source_file</api:name>
<api:arg>
- <api:type>char*</api:type>
+ <api:type>const char*</api:type>
<api:name>fname</api:name>
</api:arg>
</api:function>
</info>
<title>regress_annotation_set_source_file</title>
<synopsis><code mime="text/x-csrc">
-void regress_annotation_set_source_file (char* fname);
+void regress_annotation_set_source_file (const char* fname);
</code></synopsis>
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 2e4830cf..980ad650 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -4502,7 +4502,7 @@ detection, and fixing it via annotations.</doc>
<parameters>
<parameter name="fname" transfer-ownership="none">
<doc xml:space="preserve">Source file</doc>
- <type name="filename" c:type="char*"/>
+ <type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</function>