Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* test.c generated by valac 0.24.0, the Vala compiler
- * generated from test.vala, do not modify */
- #include <glib.h>
- #include <glib-object.h>
- #include <stdlib.h>
- #include <string.h>
- #include <stdio.h>
- #include <float.h>
- #include <math.h>
- #include <gobject/gvaluecollector.h>
- #define TYPE_TEST_CLS (test_cls_get_type ())
- #define TEST_CLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST_CLS, TestCls))
- #define TEST_CLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEST_CLS, TestClsClass))
- #define IS_TEST_CLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST_CLS))
- #define IS_TEST_CLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEST_CLS))
- #define TEST_CLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEST_CLS, TestClsClass))
- typedef struct _TestCls TestCls;
- typedef struct _TestClsClass TestClsClass;
- typedef struct _TestClsPrivate TestClsPrivate;
- typedef struct _ParamSpecTestCls ParamSpecTestCls;
- #define DEMO_TYPE_HELLO_WORLD (demo_hello_world_get_type ())
- #define DEMO_HELLO_WORLD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEMO_TYPE_HELLO_WORLD, DemoHelloWorld))
- #define DEMO_HELLO_WORLD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEMO_TYPE_HELLO_WORLD, DemoHelloWorldClass))
- #define DEMO_IS_HELLO_WORLD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEMO_TYPE_HELLO_WORLD))
- #define DEMO_IS_HELLO_WORLD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEMO_TYPE_HELLO_WORLD))
- #define DEMO_HELLO_WORLD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEMO_TYPE_HELLO_WORLD, DemoHelloWorldClass))
- typedef struct _DemoHelloWorld DemoHelloWorld;
- typedef struct _DemoHelloWorldClass DemoHelloWorldClass;
- typedef struct _DemoHelloWorldPrivate DemoHelloWorldPrivate;
- #define _g_free0(var) (var = (g_free (var), NULL))
- #define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
- #define _test_cls_unref0(var) ((var == NULL) ? NULL : (var = (test_cls_unref (var), NULL)))
- struct _TestCls {
- GTypeInstance parent_instance;
- volatile int ref_count;
- TestClsPrivate * priv;
- gint pTest;
- };
- struct _TestClsClass {
- GTypeClass parent_class;
- void (*finalize) (TestCls *self);
- };
- struct _TestClsPrivate {
- gint mTest;
- };
- struct _ParamSpecTestCls {
- GParamSpec parent_instance;
- };
- typedef void (*PrintIntFunc) (gint a, void* user_data);
- struct _DemoHelloWorld {
- GObject parent_instance;
- DemoHelloWorldPrivate * priv;
- };
- struct _DemoHelloWorldClass {
- GObjectClass parent_class;
- };
- static gpointer test_cls_parent_class = NULL;
- static gpointer demo_hello_world_parent_class = NULL;
- gpointer test_cls_ref (gpointer instance);
- void test_cls_unref (gpointer instance);
- GParamSpec* param_spec_test_cls (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
- void value_set_test_cls (GValue* value, gpointer v_object);
- void value_take_test_cls (GValue* value, gpointer v_object);
- gpointer value_get_test_cls (const GValue* value);
- GType test_cls_get_type (void) G_GNUC_CONST;
- #define TEST_CLS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TEST_CLS, TestClsPrivate))
- enum {
- TEST_CLS_DUMMY_PROPERTY
- };
- TestCls* test_cls_new (void);
- TestCls* test_cls_construct (GType object_type);
- gint test_cls_getVal (TestCls* self);
- static void test_cls_finalize (TestCls* obj);
- GType demo_hello_world_get_type (void) G_GNUC_CONST;
- enum {
- DEMO_HELLO_WORLD_DUMMY_PROPERTY
- };
- gint demo_hello_world_main (gchar** args, int args_length1);
- DemoHelloWorld* demo_hello_world_new (void);
- DemoHelloWorld* demo_hello_world_construct (GType object_type);
- TestCls* test_cls_construct (GType object_type) {
- TestCls* self = NULL;
- self = (TestCls*) g_type_create_instance (object_type);
- self->priv->mTest = 321;
- self->pTest = 111;
- return self;
- }
- TestCls* test_cls_new (void) {
- return test_cls_construct (TYPE_TEST_CLS);
- }
- gint test_cls_getVal (TestCls* self) {
- gint result = 0;
- gint _tmp0_ = 0;
- gint _tmp1_ = 0;
- g_return_val_if_fail (self != NULL, 0);
- _tmp0_ = self->priv->mTest;
- _tmp1_ = self->pTest;
- result = (_tmp0_ + 123) + _tmp1_;
- return result;
- }
- static void value_test_cls_init (GValue* value) {
- value->data[0].v_pointer = NULL;
- }
- static void value_test_cls_free_value (GValue* value) {
- if (value->data[0].v_pointer) {
- test_cls_unref (value->data[0].v_pointer);
- }
- }
- static void value_test_cls_copy_value (const GValue* src_value, GValue* dest_value) {
- if (src_value->data[0].v_pointer) {
- dest_value->data[0].v_pointer = test_cls_ref (src_value->data[0].v_pointer);
- } else {
- dest_value->data[0].v_pointer = NULL;
- }
- }
- static gpointer value_test_cls_peek_pointer (const GValue* value) {
- return value->data[0].v_pointer;
- }
- static gchar* value_test_cls_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
- if (collect_values[0].v_pointer) {
- TestCls* object;
- object = collect_values[0].v_pointer;
- if (object->parent_instance.g_class == NULL) {
- return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
- } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
- return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
- }
- value->data[0].v_pointer = test_cls_ref (object);
- } else {
- value->data[0].v_pointer = NULL;
- }
- return NULL;
- }
- static gchar* value_test_cls_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
- TestCls** object_p;
- object_p = collect_values[0].v_pointer;
- if (!object_p) {
- return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
- }
- if (!value->data[0].v_pointer) {
- *object_p = NULL;
- } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
- *object_p = value->data[0].v_pointer;
- } else {
- *object_p = test_cls_ref (value->data[0].v_pointer);
- }
- return NULL;
- }
- GParamSpec* param_spec_test_cls (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
- ParamSpecTestCls* spec;
- g_return_val_if_fail (g_type_is_a (object_type, TYPE_TEST_CLS), NULL);
- spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
- G_PARAM_SPEC (spec)->value_type = object_type;
- return G_PARAM_SPEC (spec);
- }
- gpointer value_get_test_cls (const GValue* value) {
- g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_CLS), NULL);
- return value->data[0].v_pointer;
- }
- void value_set_test_cls (GValue* value, gpointer v_object) {
- TestCls* old;
- g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_CLS));
- old = value->data[0].v_pointer;
- if (v_object) {
- g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TEST_CLS));
- g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
- value->data[0].v_pointer = v_object;
- test_cls_ref (value->data[0].v_pointer);
- } else {
- value->data[0].v_pointer = NULL;
- }
- if (old) {
- test_cls_unref (old);
- }
- }
- void value_take_test_cls (GValue* value, gpointer v_object) {
- TestCls* old;
- g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_CLS));
- old = value->data[0].v_pointer;
- if (v_object) {
- g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TEST_CLS));
- g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
- value->data[0].v_pointer = v_object;
- } else {
- value->data[0].v_pointer = NULL;
- }
- if (old) {
- test_cls_unref (old);
- }
- }
- static void test_cls_class_init (TestClsClass * klass) {
- test_cls_parent_class = g_type_class_peek_parent (klass);
- TEST_CLS_CLASS (klass)->finalize = test_cls_finalize;
- g_type_class_add_private (klass, sizeof (TestClsPrivate));
- }
- static void test_cls_instance_init (TestCls * self) {
- self->priv = TEST_CLS_GET_PRIVATE (self);
- self->ref_count = 1;
- }
- static void test_cls_finalize (TestCls* obj) {
- TestCls * self;
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TEST_CLS, TestCls);
- }
- GType test_cls_get_type (void) {
- static volatile gsize test_cls_type_id__volatile = 0;
- if (g_once_init_enter (&test_cls_type_id__volatile)) {
- static const GTypeValueTable g_define_type_value_table = { value_test_cls_init, value_test_cls_free_value, value_test_cls_copy_value, value_test_cls_peek_pointer, "p", value_test_cls_collect_value, "p", value_test_cls_lcopy_value };
- static const GTypeInfo g_define_type_info = { sizeof (TestClsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) test_cls_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TestCls), 0, (GInstanceInitFunc) test_cls_instance_init, &g_define_type_value_table };
- static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
- GType test_cls_type_id;
- test_cls_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TestCls", &g_define_type_info, &g_define_type_fundamental_info, 0);
- g_once_init_leave (&test_cls_type_id__volatile, test_cls_type_id);
- }
- return test_cls_type_id__volatile;
- }
- gpointer test_cls_ref (gpointer instance) {
- TestCls* self;
- self = instance;
- g_atomic_int_inc (&self->ref_count);
- return instance;
- }
- void test_cls_unref (gpointer instance) {
- TestCls* self;
- self = instance;
- if (g_atomic_int_dec_and_test (&self->ref_count)) {
- TEST_CLS_GET_CLASS (self)->finalize (self);
- g_type_free_instance ((GTypeInstance *) self);
- }
- }
- static gchar* string_slice (const gchar* self, glong start, glong end) {
- gchar* result = NULL;
- glong string_length = 0L;
- gint _tmp0_ = 0;
- gint _tmp1_ = 0;
- glong _tmp2_ = 0L;
- glong _tmp5_ = 0L;
- gboolean _tmp8_ = FALSE;
- glong _tmp9_ = 0L;
- gboolean _tmp12_ = FALSE;
- glong _tmp13_ = 0L;
- glong _tmp16_ = 0L;
- glong _tmp17_ = 0L;
- glong _tmp18_ = 0L;
- glong _tmp19_ = 0L;
- glong _tmp20_ = 0L;
- gchar* _tmp21_ = NULL;
- g_return_val_if_fail (self != NULL, NULL);
- _tmp0_ = strlen (self);
- _tmp1_ = _tmp0_;
- string_length = (glong) _tmp1_;
- _tmp2_ = start;
- if (_tmp2_ < ((glong) 0)) {
- glong _tmp3_ = 0L;
- glong _tmp4_ = 0L;
- _tmp3_ = string_length;
- _tmp4_ = start;
- start = _tmp3_ + _tmp4_;
- }
- _tmp5_ = end;
- if (_tmp5_ < ((glong) 0)) {
- glong _tmp6_ = 0L;
- glong _tmp7_ = 0L;
- _tmp6_ = string_length;
- _tmp7_ = end;
- end = _tmp6_ + _tmp7_;
- }
- _tmp9_ = start;
- if (_tmp9_ >= ((glong) 0)) {
- glong _tmp10_ = 0L;
- glong _tmp11_ = 0L;
- _tmp10_ = start;
- _tmp11_ = string_length;
- _tmp8_ = _tmp10_ <= _tmp11_;
- } else {
- _tmp8_ = FALSE;
- }
- g_return_val_if_fail (_tmp8_, NULL);
- _tmp13_ = end;
- if (_tmp13_ >= ((glong) 0)) {
- glong _tmp14_ = 0L;
- glong _tmp15_ = 0L;
- _tmp14_ = end;
- _tmp15_ = string_length;
- _tmp12_ = _tmp14_ <= _tmp15_;
- } else {
- _tmp12_ = FALSE;
- }
- g_return_val_if_fail (_tmp12_, NULL);
- _tmp16_ = start;
- _tmp17_ = end;
- g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
- _tmp18_ = start;
- _tmp19_ = end;
- _tmp20_ = start;
- _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
- result = _tmp21_;
- return result;
- }
- static const gchar* string_to_string (const gchar* self) {
- const gchar* result = NULL;
- g_return_val_if_fail (self != NULL, NULL);
- result = self;
- return result;
- }
- static gboolean bool_parse (const gchar* str) {
- gboolean result = FALSE;
- const gchar* _tmp0_ = NULL;
- g_return_val_if_fail (str != NULL, FALSE);
- _tmp0_ = str;
- if (g_strcmp0 (_tmp0_, "true") == 0) {
- result = TRUE;
- return result;
- } else {
- result = FALSE;
- return result;
- }
- }
- static gdouble double_parse (const gchar* str) {
- gdouble result = 0.0;
- const gchar* _tmp0_ = NULL;
- gdouble _tmp1_ = 0.0;
- g_return_val_if_fail (str != NULL, 0.0);
- _tmp0_ = str;
- _tmp1_ = g_ascii_strtod (_tmp0_, NULL);
- result = _tmp1_;
- return result;
- }
- static gchar* bool_to_string (gboolean self) {
- gchar* result = NULL;
- if (self) {
- gchar* _tmp0_ = NULL;
- _tmp0_ = g_strdup ("true");
- result = _tmp0_;
- return result;
- } else {
- gchar* _tmp1_ = NULL;
- _tmp1_ = g_strdup ("false");
- result = _tmp1_;
- return result;
- }
- }
- static gchar* double_to_string (gdouble self) {
- gchar* result = NULL;
- gchar* _tmp0_ = NULL;
- gchar* _tmp1_ = NULL;
- gint _tmp1__length1 = 0;
- const gchar* _tmp2_ = NULL;
- gchar* _tmp3_ = NULL;
- gchar* _tmp4_ = NULL;
- _tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
- _tmp1_ = _tmp0_;
- _tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
- _tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
- _tmp3_ = g_strdup (_tmp2_);
- _tmp4_ = _tmp3_;
- _tmp1_ = (g_free (_tmp1_), NULL);
- result = _tmp4_;
- return result;
- }
- static gchar* g_file_stream_read_line (FILE* self) {
- gchar* result = NULL;
- gint c = 0;
- GString* ret = NULL;
- GString* _tmp7_ = NULL;
- g_return_val_if_fail (self != NULL, NULL);
- ret = NULL;
- while (TRUE) {
- gint _tmp0_ = 0;
- gint _tmp1_ = 0;
- GString* _tmp2_ = NULL;
- gint _tmp4_ = 0;
- GString* _tmp5_ = NULL;
- gint _tmp6_ = 0;
- _tmp0_ = fgetc (self);
- c = _tmp0_;
- _tmp1_ = c;
- if (!(_tmp1_ != EOF)) {
- break;
- }
- _tmp2_ = ret;
- if (_tmp2_ == NULL) {
- GString* _tmp3_ = NULL;
- _tmp3_ = g_string_new ("");
- _g_string_free0 (ret);
- ret = _tmp3_;
- }
- _tmp4_ = c;
- if (_tmp4_ == ((gint) '\n')) {
- break;
- }
- _tmp5_ = ret;
- _tmp6_ = c;
- g_string_append_c ((GString*) _tmp5_, (gchar) _tmp6_);
- }
- _tmp7_ = ret;
- if (_tmp7_ == NULL) {
- result = NULL;
- _g_string_free0 (ret);
- return result;
- } else {
- GString* _tmp8_ = NULL;
- const gchar* _tmp9_ = NULL;
- gchar* _tmp10_ = NULL;
- _tmp8_ = ret;
- _tmp9_ = ((GString*) _tmp8_)->str;
- _tmp10_ = g_strdup (_tmp9_);
- result = _tmp10_;
- _g_string_free0 (ret);
- return result;
- }
- _g_string_free0 (ret);
- }
- gint demo_hello_world_main (gchar** args, int args_length1) {
- gint result = 0;
- gchar* greeting = NULL;
- gchar* _tmp0_ = NULL;
- gchar* s1 = NULL;
- const gchar* _tmp1_ = NULL;
- gchar* _tmp2_ = NULL;
- gchar* s2 = NULL;
- const gchar* _tmp3_ = NULL;
- gchar* _tmp4_ = NULL;
- FILE* _tmp5_ = NULL;
- const gchar* _tmp6_ = NULL;
- const gchar* _tmp7_ = NULL;
- const gchar* _tmp8_ = NULL;
- const gchar* _tmp9_ = NULL;
- gchar* _tmp10_ = NULL;
- gchar* _tmp11_ = NULL;
- gboolean b = FALSE;
- gboolean _tmp12_ = FALSE;
- gint i = 0;
- gint _tmp13_ = 0;
- gdouble d = 0.0;
- gdouble _tmp14_ = 0.0;
- FILE* _tmp15_ = NULL;
- gboolean _tmp16_ = FALSE;
- gchar* _tmp17_ = NULL;
- gchar* _tmp18_ = NULL;
- gint _tmp19_ = 0;
- gchar* _tmp20_ = NULL;
- gchar* _tmp21_ = NULL;
- gdouble _tmp22_ = 0.0;
- gchar* _tmp23_ = NULL;
- gchar* _tmp24_ = NULL;
- gchar* _tmp25_ = NULL;
- gchar* _tmp26_ = NULL;
- gchar* _tmp27_ = NULL;
- gchar* _tmp28_ = NULL;
- FILE* _tmp29_ = NULL;
- const gchar* _tmp30_ = NULL;
- const gchar* _tmp31_ = NULL;
- const gchar* _tmp32_ = NULL;
- const gchar* _tmp33_ = NULL;
- gchar* _tmp34_ = NULL;
- gchar* _tmp35_ = NULL;
- FILE* _tmp36_ = NULL;
- gint number = 0;
- FILE* _tmp37_ = NULL;
- gchar* _tmp38_ = NULL;
- gchar* _tmp39_ = NULL;
- gint _tmp40_ = 0;
- gint _tmp41_ = 0;
- FILE* _tmp42_ = NULL;
- gint _tmp43_ = 0;
- gint* arr = NULL;
- gint* _tmp44_ = NULL;
- gint arr_length1 = 0;
- gint _arr_size_ = 0;
- gint* _tmp45_ = NULL;
- gint _tmp45__length1 = 0;
- TestCls* t = NULL;
- TestCls* _tmp48_ = NULL;
- gint _tmp49_ = 0;
- gint x = 0;
- gint _tmp50_ = 0;
- FILE* _tmp51_ = NULL;
- gchar* _tmp52_ = NULL;
- gchar* _tmp53_ = NULL;
- gchar* _tmp54_ = NULL;
- gchar* _tmp55_ = NULL;
- _tmp0_ = g_strdup ("hello, world");
- greeting = _tmp0_;
- _tmp1_ = greeting;
- _tmp2_ = string_slice (_tmp1_, (glong) 7, (glong) 12);
- s1 = _tmp2_;
- _tmp3_ = greeting;
- _tmp4_ = string_slice (_tmp3_, (glong) (-4), (glong) (-2));
- s2 = _tmp4_;
- _tmp5_ = stdout;
- _tmp6_ = s1;
- _tmp7_ = string_to_string (_tmp6_);
- _tmp8_ = s2;
- _tmp9_ = string_to_string (_tmp8_);
- _tmp10_ = g_strconcat ("s1 = ", _tmp7_, ", s2 = ", _tmp9_, "\n", NULL);
- _tmp11_ = _tmp10_;
- fprintf (_tmp5_, "%s", _tmp11_);
- _g_free0 (_tmp11_);
- _tmp12_ = bool_parse ("false");
- b = _tmp12_;
- _tmp13_ = atoi ("-52");
- i = _tmp13_;
- _tmp14_ = double_parse ("6.67428E-3");
- d = _tmp14_;
- _tmp15_ = stdout;
- _tmp16_ = b;
- _tmp17_ = bool_to_string (_tmp16_);
- _tmp18_ = _tmp17_;
- _tmp19_ = i;
- _tmp20_ = g_strdup_printf ("%i", _tmp19_);
- _tmp21_ = _tmp20_;
- _tmp22_ = d;
- _tmp23_ = double_to_string (_tmp22_);
- _tmp24_ = _tmp23_;
- _tmp25_ = g_strconcat ("b = ", _tmp18_, ", i = ", _tmp21_, ", d = ", _tmp24_, "\n", NULL);
- _tmp26_ = _tmp25_;
- fprintf (_tmp15_, "%s", _tmp26_);
- _g_free0 (_tmp26_);
- _g_free0 (_tmp24_);
- _g_free0 (_tmp21_);
- _g_free0 (_tmp18_);
- _tmp27_ = bool_to_string (TRUE);
- _g_free0 (s1);
- s1 = _tmp27_;
- _tmp28_ = g_strdup_printf ("%i", 21);
- _g_free0 (s2);
- s2 = _tmp28_;
- _tmp29_ = stdout;
- _tmp30_ = s1;
- _tmp31_ = string_to_string (_tmp30_);
- _tmp32_ = s2;
- _tmp33_ = string_to_string (_tmp32_);
- _tmp34_ = g_strconcat ("s1 = ", _tmp31_, ", s2 = ", _tmp33_, "\n", NULL);
- _tmp35_ = _tmp34_;
- fprintf (_tmp29_, "%s", _tmp35_);
- _g_free0 (_tmp35_);
- _tmp36_ = stdout;
- fprintf (_tmp36_, "%d %g %s\n", 42, 3.1415, "Vala");
- _tmp37_ = stdin;
- _tmp38_ = g_file_stream_read_line (_tmp37_);
- _tmp39_ = _tmp38_;
- _tmp40_ = atoi (_tmp39_);
- _tmp41_ = _tmp40_;
- _g_free0 (_tmp39_);
- number = _tmp41_;
- _tmp42_ = stdout;
- _tmp43_ = number;
- fprintf (_tmp42_, "parsed: %d", _tmp43_);
- _tmp44_ = g_new0 (gint, 5);
- _tmp44_[0] = 3;
- _tmp44_[1] = 9;
- _tmp44_[2] = 2;
- _tmp44_[3] = 7;
- _tmp44_[4] = 5;
- arr = _tmp44_;
- arr_length1 = 5;
- _arr_size_ = arr_length1;
- _tmp45_ = arr;
- _tmp45__length1 = arr_length1;
- {
- gint* a_collection = NULL;
- gint a_collection_length1 = 0;
- gint _a_collection_size_ = 0;
- gint a_it = 0;
- a_collection = _tmp45_;
- a_collection_length1 = _tmp45__length1;
- for (a_it = 0; a_it < _tmp45__length1; a_it = a_it + 1) {
- gint a = 0;
- a = a_collection[a_it];
- {
- FILE* _tmp46_ = NULL;
- gint _tmp47_ = 0;
- _tmp46_ = stdout;
- _tmp47_ = a;
- fprintf (_tmp46_, "%d\n", _tmp47_);
- }
- }
- }
- _tmp48_ = test_cls_new ();
- t = _tmp48_;
- _tmp49_ = t->pTest;
- t->pTest = _tmp49_ + 1;
- _tmp50_ = test_cls_getVal (t);
- x = _tmp50_;
- _tmp51_ = stdout;
- _tmp52_ = g_strdup_printf ("%i", x);
- _tmp53_ = _tmp52_;
- _tmp54_ = g_strconcat ("returned val = ", _tmp53_, "\n", NULL);
- _tmp55_ = _tmp54_;
- fprintf (_tmp51_, "%s", _tmp55_);
- _g_free0 (_tmp55_);
- _g_free0 (_tmp53_);
- result = 0;
- _test_cls_unref0 (t);
- arr = (g_free (arr), NULL);
- _g_free0 (s2);
- _g_free0 (s1);
- _g_free0 (greeting);
- return result;
- }
- int main (int argc, char ** argv) {
- #if !GLIB_CHECK_VERSION (2,35,0)
- g_type_init ();
- #endif
- return demo_hello_world_main (argv, argc);
- }
- DemoHelloWorld* demo_hello_world_construct (GType object_type) {
- DemoHelloWorld * self = NULL;
- self = (DemoHelloWorld*) g_object_new (object_type, NULL);
- return self;
- }
- DemoHelloWorld* demo_hello_world_new (void) {
- return demo_hello_world_construct (DEMO_TYPE_HELLO_WORLD);
- }
- static void demo_hello_world_class_init (DemoHelloWorldClass * klass) {
- demo_hello_world_parent_class = g_type_class_peek_parent (klass);
- }
- static void demo_hello_world_instance_init (DemoHelloWorld * self) {
- }
- GType demo_hello_world_get_type (void) {
- static volatile gsize demo_hello_world_type_id__volatile = 0;
- if (g_once_init_enter (&demo_hello_world_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (DemoHelloWorldClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) demo_hello_world_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DemoHelloWorld), 0, (GInstanceInitFunc) demo_hello_world_instance_init, NULL };
- GType demo_hello_world_type_id;
- demo_hello_world_type_id = g_type_register_static (G_TYPE_OBJECT, "DemoHelloWorld", &g_define_type_info, 0);
- g_once_init_leave (&demo_hello_world_type_id__volatile, demo_hello_world_type_id);
- }
- return demo_hello_world_type_id__volatile;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement