summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-06-03 17:32:15 -0400
committerColin Walters <walters@verbum.org>2011-06-03 17:33:16 -0400
commit6e1158f62b0b2f50603d018ebeff6d2c75dd5f98 (patch)
tree8b19f0cdeb2f56018c58faf30ef92500938f05e1 /tests
parent113656896ae85391d0ee52261451361363439474 (diff)
downloadgobject-introspection-6e1158f62b0b2f50603d018ebeff6d2c75dd5f98.tar.gz
scanner: Support _get_gtype() as a GType creation suffix
Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=646635
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/Regress-1.0-expected.gir2
-rw-r--r--tests/scanner/regress.c4
-rw-r--r--tests/scanner/regress.h3
3 files changed, 5 insertions, 4 deletions
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index c67de860..6302579d 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -985,7 +985,7 @@ TpAccount::status-changed</doc>
<record name="TestSimpleBoxedA"
c:type="RegressTestSimpleBoxedA"
glib:type-name="RegressTestSimpleBoxedA"
- glib:get-type="regress_test_simple_boxed_a_get_type"
+ glib:get-type="regress_test_simple_boxed_a_get_gtype"
c:symbol-prefix="test_simple_boxed_a">
<field name="some_int" writable="1">
<type name="gint" c:type="gint"/>
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 7756f200..447d37cd 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -1425,7 +1425,7 @@ regress_test_simple_boxed_a_free (RegressTestSimpleBoxedA *a)
}
GType
-regress_test_simple_boxed_a_get_type (void)
+regress_test_simple_boxed_a_get_gtype (void)
{
static GType our_type = 0;
@@ -1783,7 +1783,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
0 /* n_params */,
NULL /* param_types */);
- param_types[0] = regress_test_simple_boxed_a_get_type() | G_SIGNAL_TYPE_STATIC_SCOPE;
+ param_types[0] = regress_test_simple_boxed_a_get_gtype() | G_SIGNAL_TYPE_STATIC_SCOPE;
klass->test_signal_with_static_scope_arg =
g_signal_newv ("test-with-static-scope-arg",
G_TYPE_FROM_CLASS (gobject_class),
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index 9f326405..37213548 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -251,7 +251,8 @@ struct _RegressTestSimpleBoxedA
RegressTestEnum some_enum;
};
-GType regress_test_simple_boxed_a_get_type (void);
+/* Intentionally uses _get_gtype */
+GType regress_test_simple_boxed_a_get_gtype (void);
RegressTestSimpleBoxedA *regress_test_simple_boxed_a_copy (RegressTestSimpleBoxedA *a);
gboolean regress_test_simple_boxed_a_equals (RegressTestSimpleBoxedA *a,
RegressTestSimpleBoxedA *other_a);