[vala/staging] tests: Add missing tests/objects/class-partial.c-expected
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] tests: Add missing tests/objects/class-partial.c-expected
- Date: Sat, 30 Oct 2021 12:30:56 +0000 (UTC)
commit b79a8acf0a7e10c2d629db55c56b2065af31581a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Oct 30 14:29:15 2021 +0200
tests: Add missing tests/objects/class-partial.c-expected
tests/objects/class-partial.c-expected | 602 +++++++++++++++++++++++++++++++++
1 file changed, 602 insertions(+)
---
diff --git a/tests/objects/class-partial.c-expected b/tests/objects/class-partial.c-expected
new file mode 100644
index 000000000..0cf36ee73
--- /dev/null
+++ b/tests/objects/class-partial.c-expected
@@ -0,0 +1,602 @@
+/* objects_class_partial.c generated by valac, the Vala compiler
+ * generated from objects_class_partial.vala, do not modify */
+
+#include <glib-object.h>
+#include <glib.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
+#define TYPE_IFOO (ifoo_get_type ())
+#define IFOO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IFOO, IFoo))
+#define IS_IFOO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IFOO))
+#define IFOO_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_IFOO, IFooIface))
+
+typedef struct _IFoo IFoo;
+typedef struct _IFooIface IFooIface;
+
+#define TYPE_IBAR (ibar_get_type ())
+#define IBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IBAR, IBar))
+#define IS_IBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IBAR))
+#define IBAR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_IBAR, IBarIface))
+
+typedef struct _IBar IBar;
+typedef struct _IBarIface IBarIface;
+
+#define TYPE_FOO (foo_get_type ())
+#define FOO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FOO, Foo))
+#define FOO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FOO, FooClass))
+#define IS_FOO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FOO))
+#define IS_FOO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FOO))
+#define FOO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FOO, FooClass))
+
+typedef struct _Foo Foo;
+typedef struct _FooClass FooClass;
+typedef struct _FooPrivate FooPrivate;
+enum {
+ FOO_0_PROPERTY,
+ FOO_P0_PROPERTY,
+ FOO_P1_PROPERTY,
+ FOO_P2_PROPERTY,
+ FOO_NUM_PROPERTIES
+};
+static GParamSpec* foo_properties[FOO_NUM_PROPERTIES];
+#define _g_free0(var) (var = (g_free (var), NULL))
+enum {
+ FOO_S0_SIGNAL,
+ FOO_S1_SIGNAL,
+ FOO_S2_SIGNAL,
+ FOO_NUM_SIGNALS
+};
+static guint foo_signals[FOO_NUM_SIGNALS] = {0};
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__,
__LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN,
G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning
(G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__,
__LINE__, G_STRFUNC, msg);
+
+struct _IFooIface {
+ GTypeInterface parent_iface;
+ void (*i1) (IFoo* self);
+};
+
+struct _IBarIface {
+ GTypeInterface parent_iface;
+ void (*i2) (IBar* self);
+};
+
+struct _Foo {
+ GObject parent_instance;
+ FooPrivate * priv;
+ gchar* f0;
+ gchar* f1;
+ gchar* f2;
+};
+
+struct _FooClass {
+ GObjectClass parent_class;
+ void (*v0) (Foo* self);
+ void (*v1) (Foo* self);
+ void (*v2) (Foo* self);
+ void (*s0) (Foo* self);
+ void (*s1) (Foo* self);
+ void (*s2) (Foo* self);
+};
+
+struct _FooPrivate {
+ gchar* _p0;
+ gchar* _p1;
+ gchar* _p2;
+};
+
+static gint Foo_private_offset;
+static gpointer foo_parent_class = NULL;
+static IFooIface * foo_ifoo_parent_iface = NULL;
+static IBarIface * foo_ibar_parent_iface = NULL;
+
+VALA_EXTERN GType ifoo_get_type (void) G_GNUC_CONST ;
+VALA_EXTERN void ifoo_i1 (IFoo* self);
+static GType ifoo_get_type_once (void);
+VALA_EXTERN GType ibar_get_type (void) G_GNUC_CONST ;
+VALA_EXTERN void ibar_i2 (IBar* self);
+static GType ibar_get_type_once (void);
+VALA_EXTERN GType foo_get_type (void) G_GNUC_CONST ;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (Foo, g_object_unref)
+VALA_EXTERN void foo_v0 (Foo* self);
+VALA_EXTERN void foo_v1 (Foo* self);
+VALA_EXTERN void foo_v2 (Foo* self);
+VALA_EXTERN void foo_m0 (Foo* self);
+static void foo_real_v0 (Foo* self);
+VALA_EXTERN Foo* foo_new (void);
+VALA_EXTERN Foo* foo_construct (GType object_type);
+VALA_EXTERN void foo_m1 (Foo* self);
+static void foo_real_v1 (Foo* self);
+static void foo_real_i1 (IFoo* base);
+VALA_EXTERN void foo_m2 (Foo* self);
+static void foo_real_v2 (Foo* self);
+static void foo_real_i2 (IBar* base);
+VALA_EXTERN const gchar* foo_get_p0 (Foo* self);
+VALA_EXTERN void foo_set_p0 (Foo* self,
+ const gchar* value);
+VALA_EXTERN const gchar* foo_get_p1 (Foo* self);
+VALA_EXTERN void foo_set_p1 (Foo* self,
+ const gchar* value);
+VALA_EXTERN const gchar* foo_get_p2 (Foo* self);
+VALA_EXTERN void foo_set_p2 (Foo* self,
+ const gchar* value);
+static void foo_real_s0 (Foo* self);
+static void foo_real_s1 (Foo* self);
+static void foo_real_s2 (Foo* self);
+static void foo_finalize (GObject * obj);
+static GType foo_get_type_once (void);
+static void _vala_foo_get_property (GObject * object,
+ guint property_id,
+ GValue * value,
+ GParamSpec * pspec);
+static void _vala_foo_set_property (GObject * object,
+ guint property_id,
+ const GValue * value,
+ GParamSpec * pspec);
+static void _vala_main (void);
+
+void
+ifoo_i1 (IFoo* self)
+{
+ IFooIface* _iface_;
+ g_return_if_fail (IS_IFOO (self));
+ _iface_ = IFOO_GET_INTERFACE (self);
+ if (_iface_->i1) {
+ _iface_->i1 (self);
+ }
+}
+
+static void
+ifoo_default_init (IFooIface * iface,
+ gpointer iface_data)
+{
+}
+
+static GType
+ifoo_get_type_once (void)
+{
+ static const GTypeInfo g_define_type_info = { sizeof (IFooIface), (GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL, (GClassInitFunc) ifoo_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0,
(GInstanceInitFunc) NULL, NULL };
+ GType ifoo_type_id;
+ ifoo_type_id = g_type_register_static (G_TYPE_INTERFACE, "IFoo", &g_define_type_info, 0);
+ return ifoo_type_id;
+}
+
+GType
+ifoo_get_type (void)
+{
+ static volatile gsize ifoo_type_id__volatile = 0;
+ if (g_once_init_enter (&ifoo_type_id__volatile)) {
+ GType ifoo_type_id;
+ ifoo_type_id = ifoo_get_type_once ();
+ g_once_init_leave (&ifoo_type_id__volatile, ifoo_type_id);
+ }
+ return ifoo_type_id__volatile;
+}
+
+void
+ibar_i2 (IBar* self)
+{
+ IBarIface* _iface_;
+ g_return_if_fail (IS_IBAR (self));
+ _iface_ = IBAR_GET_INTERFACE (self);
+ if (_iface_->i2) {
+ _iface_->i2 (self);
+ }
+}
+
+static void
+ibar_default_init (IBarIface * iface,
+ gpointer iface_data)
+{
+}
+
+static GType
+ibar_get_type_once (void)
+{
+ static const GTypeInfo g_define_type_info = { sizeof (IBarIface), (GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL, (GClassInitFunc) ibar_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0,
(GInstanceInitFunc) NULL, NULL };
+ GType ibar_type_id;
+ ibar_type_id = g_type_register_static (G_TYPE_INTERFACE, "IBar", &g_define_type_info, 0);
+ return ibar_type_id;
+}
+
+GType
+ibar_get_type (void)
+{
+ static volatile gsize ibar_type_id__volatile = 0;
+ if (g_once_init_enter (&ibar_type_id__volatile)) {
+ GType ibar_type_id;
+ ibar_type_id = ibar_get_type_once ();
+ g_once_init_leave (&ibar_type_id__volatile, ibar_type_id);
+ }
+ return ibar_type_id__volatile;
+}
+
+static inline gpointer
+foo_get_instance_private (Foo* self)
+{
+ return G_STRUCT_MEMBER_P (self, Foo_private_offset);
+}
+
+void
+foo_m0 (Foo* self)
+{
+ g_return_if_fail (IS_FOO (self));
+}
+
+static void
+foo_real_v0 (Foo* self)
+{
+}
+
+void
+foo_v0 (Foo* self)
+{
+ FooClass* _klass_;
+ g_return_if_fail (IS_FOO (self));
+ _klass_ = FOO_GET_CLASS (self);
+ if (_klass_->v0) {
+ _klass_->v0 (self);
+ }
+}
+
+Foo*
+foo_construct (GType object_type)
+{
+ Foo * self = NULL;
+ self = (Foo*) g_object_new (object_type, NULL);
+ return self;
+}
+
+Foo*
+foo_new (void)
+{
+ return foo_construct (TYPE_FOO);
+}
+
+void
+foo_m1 (Foo* self)
+{
+ g_return_if_fail (IS_FOO (self));
+}
+
+static void
+foo_real_v1 (Foo* self)
+{
+}
+
+void
+foo_v1 (Foo* self)
+{
+ FooClass* _klass_;
+ g_return_if_fail (IS_FOO (self));
+ _klass_ = FOO_GET_CLASS (self);
+ if (_klass_->v1) {
+ _klass_->v1 (self);
+ }
+}
+
+static void
+foo_real_i1 (IFoo* base)
+{
+ Foo * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FOO, Foo);
+}
+
+void
+foo_m2 (Foo* self)
+{
+ g_return_if_fail (IS_FOO (self));
+}
+
+static void
+foo_real_v2 (Foo* self)
+{
+}
+
+void
+foo_v2 (Foo* self)
+{
+ FooClass* _klass_;
+ g_return_if_fail (IS_FOO (self));
+ _klass_ = FOO_GET_CLASS (self);
+ if (_klass_->v2) {
+ _klass_->v2 (self);
+ }
+}
+
+static void
+foo_real_i2 (IBar* base)
+{
+ Foo * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FOO, Foo);
+}
+
+const gchar*
+foo_get_p0 (Foo* self)
+{
+ const gchar* result;
+ const gchar* _tmp0_;
+ g_return_val_if_fail (IS_FOO (self), NULL);
+ _tmp0_ = self->priv->_p0;
+ result = _tmp0_;
+ return result;
+}
+
+void
+foo_set_p0 (Foo* self,
+ const gchar* value)
+{
+ gchar* old_value;
+ g_return_if_fail (IS_FOO (self));
+ old_value = foo_get_p0 (self);
+ if (g_strcmp0 (value, old_value) != 0) {
+ gchar* _tmp0_;
+ _tmp0_ = g_strdup (value);
+ _g_free0 (self->priv->_p0);
+ self->priv->_p0 = _tmp0_;
+ g_object_notify_by_pspec ((GObject *) self, foo_properties[FOO_P0_PROPERTY]);
+ }
+}
+
+const gchar*
+foo_get_p1 (Foo* self)
+{
+ const gchar* result;
+ const gchar* _tmp0_;
+ g_return_val_if_fail (IS_FOO (self), NULL);
+ _tmp0_ = self->priv->_p1;
+ result = _tmp0_;
+ return result;
+}
+
+void
+foo_set_p1 (Foo* self,
+ const gchar* value)
+{
+ gchar* old_value;
+ g_return_if_fail (IS_FOO (self));
+ old_value = foo_get_p1 (self);
+ if (g_strcmp0 (value, old_value) != 0) {
+ gchar* _tmp0_;
+ _tmp0_ = g_strdup (value);
+ _g_free0 (self->priv->_p1);
+ self->priv->_p1 = _tmp0_;
+ g_object_notify_by_pspec ((GObject *) self, foo_properties[FOO_P1_PROPERTY]);
+ }
+}
+
+const gchar*
+foo_get_p2 (Foo* self)
+{
+ const gchar* result;
+ const gchar* _tmp0_;
+ g_return_val_if_fail (IS_FOO (self), NULL);
+ _tmp0_ = self->priv->_p2;
+ result = _tmp0_;
+ return result;
+}
+
+void
+foo_set_p2 (Foo* self,
+ const gchar* value)
+{
+ gchar* old_value;
+ g_return_if_fail (IS_FOO (self));
+ old_value = foo_get_p2 (self);
+ if (g_strcmp0 (value, old_value) != 0) {
+ gchar* _tmp0_;
+ _tmp0_ = g_strdup (value);
+ _g_free0 (self->priv->_p2);
+ self->priv->_p2 = _tmp0_;
+ g_object_notify_by_pspec ((GObject *) self, foo_properties[FOO_P2_PROPERTY]);
+ }
+}
+
+static void
+foo_real_s0 (Foo* self)
+{
+}
+
+static void
+foo_real_s1 (Foo* self)
+{
+}
+
+static void
+foo_real_s2 (Foo* self)
+{
+}
+
+static void
+foo_class_init (FooClass * klass,
+ gpointer klass_data)
+{
+ foo_parent_class = g_type_class_peek_parent (klass);
+ g_type_class_adjust_private_offset (klass, &Foo_private_offset);
+ ((FooClass *) klass)->v0 = (void (*) (Foo*)) foo_real_v0;
+ ((FooClass *) klass)->v1 = (void (*) (Foo*)) foo_real_v1;
+ ((FooClass *) klass)->v2 = (void (*) (Foo*)) foo_real_v2;
+ ((FooClass *) klass)->s0 = foo_real_s0;
+ ((FooClass *) klass)->s1 = foo_real_s1;
+ ((FooClass *) klass)->s2 = foo_real_s2;
+ G_OBJECT_CLASS (klass)->get_property = _vala_foo_get_property;
+ G_OBJECT_CLASS (klass)->set_property = _vala_foo_set_property;
+ G_OBJECT_CLASS (klass)->finalize = foo_finalize;
+ g_object_class_install_property (G_OBJECT_CLASS (klass), FOO_P0_PROPERTY,
foo_properties[FOO_P0_PROPERTY] = g_param_spec_string ("p0", "p0", "p0", NULL, G_PARAM_STATIC_STRINGS |
G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), FOO_P1_PROPERTY,
foo_properties[FOO_P1_PROPERTY] = g_param_spec_string ("p1", "p1", "p1", NULL, G_PARAM_STATIC_STRINGS |
G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), FOO_P2_PROPERTY,
foo_properties[FOO_P2_PROPERTY] = g_param_spec_string ("p2", "p2", "p2", NULL, G_PARAM_STATIC_STRINGS |
G_PARAM_READABLE | G_PARAM_WRITABLE));
+ foo_signals[FOO_S0_SIGNAL] = g_signal_new ("s0", TYPE_FOO, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
(FooClass, s0), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ foo_signals[FOO_S1_SIGNAL] = g_signal_new ("s1", TYPE_FOO, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
(FooClass, s1), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ foo_signals[FOO_S2_SIGNAL] = g_signal_new ("s2", TYPE_FOO, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
(FooClass, s2), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+}
+
+static void
+foo_ifoo_interface_init (IFooIface * iface,
+ gpointer iface_data)
+{
+ foo_ifoo_parent_iface = g_type_interface_peek_parent (iface);
+ iface->i1 = (void (*) (IFoo*)) foo_real_i1;
+}
+
+static void
+foo_ibar_interface_init (IBarIface * iface,
+ gpointer iface_data)
+{
+ foo_ibar_parent_iface = g_type_interface_peek_parent (iface);
+ iface->i2 = (void (*) (IBar*)) foo_real_i2;
+}
+
+static void
+foo_instance_init (Foo * self,
+ gpointer klass)
+{
+ self->priv = foo_get_instance_private (self);
+}
+
+static void
+foo_finalize (GObject * obj)
+{
+ Foo * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FOO, Foo);
+ _g_free0 (self->priv->_p0);
+ _g_free0 (self->f0);
+ _g_free0 (self->priv->_p1);
+ _g_free0 (self->f1);
+ _g_free0 (self->priv->_p2);
+ _g_free0 (self->f2);
+ G_OBJECT_CLASS (foo_parent_class)->finalize (obj);
+}
+
+static GType
+foo_get_type_once (void)
+{
+ static const GTypeInfo g_define_type_info = { sizeof (FooClass), (GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL, (GClassInitFunc) foo_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Foo), 0,
(GInstanceInitFunc) foo_instance_init, NULL };
+ static const GInterfaceInfo ifoo_info = { (GInterfaceInitFunc) foo_ifoo_interface_init,
(GInterfaceFinalizeFunc) NULL, NULL};
+ static const GInterfaceInfo ibar_info = { (GInterfaceInitFunc) foo_ibar_interface_init,
(GInterfaceFinalizeFunc) NULL, NULL};
+ GType foo_type_id;
+ foo_type_id = g_type_register_static (G_TYPE_OBJECT, "Foo", &g_define_type_info, 0);
+ g_type_add_interface_static (foo_type_id, TYPE_IFOO, &ifoo_info);
+ g_type_add_interface_static (foo_type_id, TYPE_IBAR, &ibar_info);
+ Foo_private_offset = g_type_add_instance_private (foo_type_id, sizeof (FooPrivate));
+ return foo_type_id;
+}
+
+GType
+foo_get_type (void)
+{
+ static volatile gsize foo_type_id__volatile = 0;
+ if (g_once_init_enter (&foo_type_id__volatile)) {
+ GType foo_type_id;
+ foo_type_id = foo_get_type_once ();
+ g_once_init_leave (&foo_type_id__volatile, foo_type_id);
+ }
+ return foo_type_id__volatile;
+}
+
+static void
+_vala_foo_get_property (GObject * object,
+ guint property_id,
+ GValue * value,
+ GParamSpec * pspec)
+{
+ Foo * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FOO, Foo);
+ switch (property_id) {
+ case FOO_P0_PROPERTY:
+ g_value_set_string (value, foo_get_p0 (self));
+ break;
+ case FOO_P1_PROPERTY:
+ g_value_set_string (value, foo_get_p1 (self));
+ break;
+ case FOO_P2_PROPERTY:
+ g_value_set_string (value, foo_get_p2 (self));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+_vala_foo_set_property (GObject * object,
+ guint property_id,
+ const GValue * value,
+ GParamSpec * pspec)
+{
+ Foo * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FOO, Foo);
+ switch (property_id) {
+ case FOO_P0_PROPERTY:
+ foo_set_p0 (self, g_value_get_string (value));
+ break;
+ case FOO_P1_PROPERTY:
+ foo_set_p1 (self, g_value_get_string (value));
+ break;
+ case FOO_P2_PROPERTY:
+ foo_set_p2 (self, g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+
+static void
+_vala_main (void)
+{
+ Foo* foo = NULL;
+ Foo* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+ gchar* _tmp3_;
+ _tmp0_ = foo_new ();
+ foo = _tmp0_;
+ foo_set_p0 (foo, "p0");
+ _tmp1_ = g_strdup ("f0");
+ _g_free0 (foo->f0);
+ foo->f0 = _tmp1_;
+ foo_m0 (foo);
+ foo_v0 (foo);
+ g_signal_emit (foo, foo_signals[FOO_S0_SIGNAL], 0);
+ foo_set_p1 (foo, "p1");
+ _tmp2_ = g_strdup ("f1");
+ _g_free0 (foo->f1);
+ foo->f1 = _tmp2_;
+ foo_m1 (foo);
+ foo_v1 (foo);
+ g_signal_emit (foo, foo_signals[FOO_S1_SIGNAL], 0);
+ foo_set_p2 (foo, "p2");
+ _tmp3_ = g_strdup ("f2");
+ _g_free0 (foo->f2);
+ foo->f2 = _tmp3_;
+ foo_m2 (foo);
+ foo_v2 (foo);
+ g_signal_emit (foo, foo_signals[FOO_S2_SIGNAL], 0);
+ _vala_assert (IS_IFOO (foo), "foo is IFoo");
+ ifoo_i1 (G_TYPE_CHECK_INSTANCE_CAST (foo, TYPE_IFOO, IFoo));
+ _vala_assert (IS_IBAR (foo), "foo is IBar");
+ ibar_i2 (G_TYPE_CHECK_INSTANCE_CAST (foo, TYPE_IBAR, IBar));
+ _g_object_unref0 (foo);
+}
+
+int
+main (int argc,
+ char ** argv)
+{
+ _vala_main ();
+ return 0;
+}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]