summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/scanner/Regress-1.0-C-expected/Regress.func_obj_nullable_in.page38
-rw-r--r--tests/scanner/Regress-1.0-Gjs-expected/Regress.func_obj_nullable_in.page36
-rw-r--r--tests/scanner/Regress-1.0-Python-expected/Regress.func_obj_nullable_in.page37
-rw-r--r--tests/scanner/Regress-1.0-expected.gir15
-rw-r--r--tests/scanner/Regress-1.0-sections-expected.txt1
-rw-r--r--tests/scanner/regress.c9
-rw-r--r--tests/scanner/regress.h2
7 files changed, 138 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.func_obj_nullable_in.page b/tests/scanner/Regress-1.0-C-expected/Regress.func_obj_nullable_in.page
new file mode 100644
index 00000000..6294367f
--- /dev/null
+++ b/tests/scanner/Regress-1.0-C-expected/Regress.func_obj_nullable_in.page
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<page id="Regress.func_obj_nullable_in"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>void</api:type>
+ </api:returns>
+ <api:name>regress_func_obj_nullable_in</api:name>
+ <api:arg>
+ <api:type>RegressTestObj*</api:type>
+ <api:name>obj</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>regress_func_obj_nullable_in</title>
+ <synopsis><code mime="text/x-csrc">
+void regress_func_obj_nullable_in (RegressTestObj* obj);
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+ <p>A <link xref="Regress.TestObj"/></p>
+</item>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.func_obj_nullable_in.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.func_obj_nullable_in.page
new file mode 100644
index 00000000..cee2cb83
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.func_obj_nullable_in.page
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<page id="Regress.func_obj_nullable_in"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>void</api:type>
+ </api:returns>
+ <api:name>regress_func_obj_nullable_in</api:name>
+ <api:arg>
+ <api:type>Regress.TestObj</api:type>
+ <api:name>obj</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>Regress.func_obj_nullable_in</title>
+ <synopsis><code mime="text/x-gjs">
+function func_obj_nullable_in(obj: <link xref="Regress.TestObj">Regress.TestObj</link>): void {
+ // Gjs wrapper for regress_func_obj_nullable_in()
+}
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+ <p>A <link xref="Regress.TestObj"/></p>
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.func_obj_nullable_in.page b/tests/scanner/Regress-1.0-Python-expected/Regress.func_obj_nullable_in.page
new file mode 100644
index 00000000..e60459c4
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Python-expected/Regress.func_obj_nullable_in.page
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<page id="Regress.func_obj_nullable_in"
+ type="topic"
+ style="function"
+ xmlns="http://projectmallard.org/1.0/"
+ xmlns:api="http://projectmallard.org/experimental/api/"
+ xmlns:ui="http://projectmallard.org/1.0/ui/">
+ <info>
+ <link xref="index" group="function" type="guide"/>
+ <api:function>
+ <api:returns>
+ <api:type>none</api:type>
+ </api:returns>
+ <api:name>regress_func_obj_nullable_in</api:name>
+ <api:arg>
+ <api:type>Regress.TestObj</api:type>
+ <api:name>obj</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>Regress.func_obj_nullable_in</title>
+ <synopsis><code mime="text/x-python">
+@accepts(Regress.TestObj)
+@returns(none)
+def func_obj_nullable_in(obj):
+ # Python wrapper for regress_func_obj_nullable_in()
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+ <p>A <link xref="Regress.TestObj"/></p>
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index e8e497af..aeb3fdbc 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -4761,6 +4761,21 @@ exposed to language bindings.</doc>
</parameter>
</parameters>
</function>
+ <function name="func_obj_nullable_in"
+ c:identifier="regress_func_obj_nullable_in">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter name="obj"
+ transfer-ownership="none"
+ nullable="1"
+ allow-none="1">
+ <doc xml:space="preserve">A #RegressTestObj</doc>
+ <type name="TestObj" c:type="RegressTestObj*"/>
+ </parameter>
+ </parameters>
+ </function>
<function name="global_get_flags_out"
c:identifier="regress_global_get_flags_out">
<return-value transfer-ownership="none">
diff --git a/tests/scanner/Regress-1.0-sections-expected.txt b/tests/scanner/Regress-1.0-sections-expected.txt
index f2286e3a..665c7beb 100644
--- a/tests/scanner/Regress-1.0-sections-expected.txt
+++ b/tests/scanner/Regress-1.0-sections-expected.txt
@@ -46,6 +46,7 @@ regress_foo_test_varargs_callback
regress_foo_test_varargs_callback2
regress_foo_test_varargs_callback3
regress_func_obj_null_in
+regress_func_obj_nullable_in
regress_global_get_flags_out
regress_has_parameter_named_attrs
regress_introspectable_via_alias
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 021a17aa..626b1324 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -3002,6 +3002,15 @@ regress_test_obj_null_out (RegressTestObj **obj)
}
/**
+ * regress_func_obj_nullable_in:
+ * @obj: (nullable): A #RegressTestObj
+ */
+void
+regress_func_obj_nullable_in (RegressTestObj *obj)
+{
+}
+
+/**
* regress_test_array_fixed_out_objects:
* @objs: (out) (array fixed-size=2) (transfer full): An array of #RegressTestObj
*/
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index 9df558bf..a06a2368 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -918,6 +918,8 @@ void regress_func_obj_null_in (RegressTestObj *obj);
_GI_TEST_EXTERN
void regress_test_obj_null_out (RegressTestObj **obj);
+void regress_func_obj_nullable_in (RegressTestObj *obj);
+
/* inheritance */
#define REGRESS_TEST_TYPE_SUB_OBJ (regress_test_sub_obj_get_type ())
#define REGRESS_TEST_SUB_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), REGRESS_TEST_TYPE_SUB_OBJ, RegressTestSubObj))