Advertisement
Guest User

Untitled

a guest
May 24th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 20.05 KB | None | 0 0
  1. /* test.c generated by valac 0.24.0, the Vala compiler
  2.  * generated from test.vala, do not modify */
  3.  
  4.  
  5. #include <glib.h>
  6. #include <glib-object.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #include <stdio.h>
  10. #include <float.h>
  11. #include <math.h>
  12. #include <gobject/gvaluecollector.h>
  13.  
  14.  
  15. #define TYPE_TEST_CLS (test_cls_get_type ())
  16. #define TEST_CLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST_CLS, TestCls))
  17. #define TEST_CLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEST_CLS, TestClsClass))
  18. #define IS_TEST_CLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST_CLS))
  19. #define IS_TEST_CLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEST_CLS))
  20. #define TEST_CLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEST_CLS, TestClsClass))
  21.  
  22. typedef struct _TestCls TestCls;
  23. typedef struct _TestClsClass TestClsClass;
  24. typedef struct _TestClsPrivate TestClsPrivate;
  25. typedef struct _ParamSpecTestCls ParamSpecTestCls;
  26.  
  27. #define DEMO_TYPE_HELLO_WORLD (demo_hello_world_get_type ())
  28. #define DEMO_HELLO_WORLD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEMO_TYPE_HELLO_WORLD, DemoHelloWorld))
  29. #define DEMO_HELLO_WORLD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEMO_TYPE_HELLO_WORLD, DemoHelloWorldClass))
  30. #define DEMO_IS_HELLO_WORLD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEMO_TYPE_HELLO_WORLD))
  31. #define DEMO_IS_HELLO_WORLD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEMO_TYPE_HELLO_WORLD))
  32. #define DEMO_HELLO_WORLD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEMO_TYPE_HELLO_WORLD, DemoHelloWorldClass))
  33.  
  34. typedef struct _DemoHelloWorld DemoHelloWorld;
  35. typedef struct _DemoHelloWorldClass DemoHelloWorldClass;
  36. typedef struct _DemoHelloWorldPrivate DemoHelloWorldPrivate;
  37. #define _g_free0(var) (var = (g_free (var), NULL))
  38. #define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
  39. #define _test_cls_unref0(var) ((var == NULL) ? NULL : (var = (test_cls_unref (var), NULL)))
  40.  
  41. struct _TestCls {
  42.     GTypeInstance parent_instance;
  43.     volatile int ref_count;
  44.     TestClsPrivate * priv;
  45.     gint pTest;
  46. };
  47.  
  48. struct _TestClsClass {
  49.     GTypeClass parent_class;
  50.     void (*finalize) (TestCls *self);
  51. };
  52.  
  53. struct _TestClsPrivate {
  54.     gint mTest;
  55. };
  56.  
  57. struct _ParamSpecTestCls {
  58.     GParamSpec parent_instance;
  59. };
  60.  
  61. typedef void (*PrintIntFunc) (gint a, void* user_data);
  62. struct _DemoHelloWorld {
  63.     GObject parent_instance;
  64.     DemoHelloWorldPrivate * priv;
  65. };
  66.  
  67. struct _DemoHelloWorldClass {
  68.     GObjectClass parent_class;
  69. };
  70.  
  71.  
  72. static gpointer test_cls_parent_class = NULL;
  73. static gpointer demo_hello_world_parent_class = NULL;
  74.  
  75. gpointer test_cls_ref (gpointer instance);
  76. void test_cls_unref (gpointer instance);
  77. GParamSpec* param_spec_test_cls (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
  78. void value_set_test_cls (GValue* value, gpointer v_object);
  79. void value_take_test_cls (GValue* value, gpointer v_object);
  80. gpointer value_get_test_cls (const GValue* value);
  81. GType test_cls_get_type (void) G_GNUC_CONST;
  82. #define TEST_CLS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TEST_CLS, TestClsPrivate))
  83. enum  {
  84.     TEST_CLS_DUMMY_PROPERTY
  85. };
  86. TestCls* test_cls_new (void);
  87. TestCls* test_cls_construct (GType object_type);
  88. gint test_cls_getVal (TestCls* self);
  89. static void test_cls_finalize (TestCls* obj);
  90. GType demo_hello_world_get_type (void) G_GNUC_CONST;
  91. enum  {
  92.     DEMO_HELLO_WORLD_DUMMY_PROPERTY
  93. };
  94. gint demo_hello_world_main (gchar** args, int args_length1);
  95. DemoHelloWorld* demo_hello_world_new (void);
  96. DemoHelloWorld* demo_hello_world_construct (GType object_type);
  97.  
  98.  
  99. TestCls* test_cls_construct (GType object_type) {
  100.     TestCls* self = NULL;
  101.     self = (TestCls*) g_type_create_instance (object_type);
  102.     self->priv->mTest = 321;
  103.     self->pTest = 111;
  104.     return self;
  105. }
  106.  
  107.  
  108. TestCls* test_cls_new (void) {
  109.     return test_cls_construct (TYPE_TEST_CLS);
  110. }
  111.  
  112.  
  113. gint test_cls_getVal (TestCls* self) {
  114.     gint result = 0;
  115.     gint _tmp0_ = 0;
  116.     gint _tmp1_ = 0;
  117.     g_return_val_if_fail (self != NULL, 0);
  118.     _tmp0_ = self->priv->mTest;
  119.     _tmp1_ = self->pTest;
  120.     result = (_tmp0_ + 123) + _tmp1_;
  121.     return result;
  122. }
  123.  
  124.  
  125. static void value_test_cls_init (GValue* value) {
  126.     value->data[0].v_pointer = NULL;
  127. }
  128.  
  129.  
  130. static void value_test_cls_free_value (GValue* value) {
  131.     if (value->data[0].v_pointer) {
  132.         test_cls_unref (value->data[0].v_pointer);
  133.     }
  134. }
  135.  
  136.  
  137. static void value_test_cls_copy_value (const GValue* src_value, GValue* dest_value) {
  138.     if (src_value->data[0].v_pointer) {
  139.         dest_value->data[0].v_pointer = test_cls_ref (src_value->data[0].v_pointer);
  140.     } else {
  141.         dest_value->data[0].v_pointer = NULL;
  142.     }
  143. }
  144.  
  145.  
  146. static gpointer value_test_cls_peek_pointer (const GValue* value) {
  147.     return value->data[0].v_pointer;
  148. }
  149.  
  150.  
  151. static gchar* value_test_cls_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
  152.     if (collect_values[0].v_pointer) {
  153.         TestCls* object;
  154.         object = collect_values[0].v_pointer;
  155.         if (object->parent_instance.g_class == NULL) {
  156.             return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
  157.         } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
  158.             return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
  159.         }
  160.         value->data[0].v_pointer = test_cls_ref (object);
  161.     } else {
  162.         value->data[0].v_pointer = NULL;
  163.     }
  164.     return NULL;
  165. }
  166.  
  167.  
  168. static gchar* value_test_cls_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
  169.     TestCls** object_p;
  170.     object_p = collect_values[0].v_pointer;
  171.     if (!object_p) {
  172.         return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
  173.     }
  174.     if (!value->data[0].v_pointer) {
  175.         *object_p = NULL;
  176.     } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
  177.         *object_p = value->data[0].v_pointer;
  178.     } else {
  179.         *object_p = test_cls_ref (value->data[0].v_pointer);
  180.     }
  181.     return NULL;
  182. }
  183.  
  184.  
  185. GParamSpec* param_spec_test_cls (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
  186.     ParamSpecTestCls* spec;
  187.     g_return_val_if_fail (g_type_is_a (object_type, TYPE_TEST_CLS), NULL);
  188.     spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
  189.     G_PARAM_SPEC (spec)->value_type = object_type;
  190.     return G_PARAM_SPEC (spec);
  191. }
  192.  
  193.  
  194. gpointer value_get_test_cls (const GValue* value) {
  195.     g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_CLS), NULL);
  196.     return value->data[0].v_pointer;
  197. }
  198.  
  199.  
  200. void value_set_test_cls (GValue* value, gpointer v_object) {
  201.     TestCls* old;
  202.     g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_CLS));
  203.     old = value->data[0].v_pointer;
  204.     if (v_object) {
  205.         g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TEST_CLS));
  206.         g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
  207.         value->data[0].v_pointer = v_object;
  208.         test_cls_ref (value->data[0].v_pointer);
  209.     } else {
  210.         value->data[0].v_pointer = NULL;
  211.     }
  212.     if (old) {
  213.         test_cls_unref (old);
  214.     }
  215. }
  216.  
  217.  
  218. void value_take_test_cls (GValue* value, gpointer v_object) {
  219.     TestCls* old;
  220.     g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TEST_CLS));
  221.     old = value->data[0].v_pointer;
  222.     if (v_object) {
  223.         g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TEST_CLS));
  224.         g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
  225.         value->data[0].v_pointer = v_object;
  226.     } else {
  227.         value->data[0].v_pointer = NULL;
  228.     }
  229.     if (old) {
  230.         test_cls_unref (old);
  231.     }
  232. }
  233.  
  234.  
  235. static void test_cls_class_init (TestClsClass * klass) {
  236.     test_cls_parent_class = g_type_class_peek_parent (klass);
  237.     TEST_CLS_CLASS (klass)->finalize = test_cls_finalize;
  238.     g_type_class_add_private (klass, sizeof (TestClsPrivate));
  239. }
  240.  
  241.  
  242. static void test_cls_instance_init (TestCls * self) {
  243.     self->priv = TEST_CLS_GET_PRIVATE (self);
  244.     self->ref_count = 1;
  245. }
  246.  
  247.  
  248. static void test_cls_finalize (TestCls* obj) {
  249.     TestCls * self;
  250.     self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TEST_CLS, TestCls);
  251. }
  252.  
  253.  
  254. GType test_cls_get_type (void) {
  255.     static volatile gsize test_cls_type_id__volatile = 0;
  256.     if (g_once_init_enter (&test_cls_type_id__volatile)) {
  257.         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 };
  258.         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 };
  259.         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) };
  260.         GType test_cls_type_id;
  261.         test_cls_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TestCls", &g_define_type_info, &g_define_type_fundamental_info, 0);
  262.         g_once_init_leave (&test_cls_type_id__volatile, test_cls_type_id);
  263.     }
  264.     return test_cls_type_id__volatile;
  265. }
  266.  
  267.  
  268. gpointer test_cls_ref (gpointer instance) {
  269.     TestCls* self;
  270.     self = instance;
  271.     g_atomic_int_inc (&self->ref_count);
  272.     return instance;
  273. }
  274.  
  275.  
  276. void test_cls_unref (gpointer instance) {
  277.     TestCls* self;
  278.     self = instance;
  279.     if (g_atomic_int_dec_and_test (&self->ref_count)) {
  280.         TEST_CLS_GET_CLASS (self)->finalize (self);
  281.         g_type_free_instance ((GTypeInstance *) self);
  282.     }
  283. }
  284.  
  285.  
  286. static gchar* string_slice (const gchar* self, glong start, glong end) {
  287.     gchar* result = NULL;
  288.     glong string_length = 0L;
  289.     gint _tmp0_ = 0;
  290.     gint _tmp1_ = 0;
  291.     glong _tmp2_ = 0L;
  292.     glong _tmp5_ = 0L;
  293.     gboolean _tmp8_ = FALSE;
  294.     glong _tmp9_ = 0L;
  295.     gboolean _tmp12_ = FALSE;
  296.     glong _tmp13_ = 0L;
  297.     glong _tmp16_ = 0L;
  298.     glong _tmp17_ = 0L;
  299.     glong _tmp18_ = 0L;
  300.     glong _tmp19_ = 0L;
  301.     glong _tmp20_ = 0L;
  302.     gchar* _tmp21_ = NULL;
  303.     g_return_val_if_fail (self != NULL, NULL);
  304.     _tmp0_ = strlen (self);
  305.     _tmp1_ = _tmp0_;
  306.     string_length = (glong) _tmp1_;
  307.     _tmp2_ = start;
  308.     if (_tmp2_ < ((glong) 0)) {
  309.         glong _tmp3_ = 0L;
  310.         glong _tmp4_ = 0L;
  311.         _tmp3_ = string_length;
  312.         _tmp4_ = start;
  313.         start = _tmp3_ + _tmp4_;
  314.     }
  315.     _tmp5_ = end;
  316.     if (_tmp5_ < ((glong) 0)) {
  317.         glong _tmp6_ = 0L;
  318.         glong _tmp7_ = 0L;
  319.         _tmp6_ = string_length;
  320.         _tmp7_ = end;
  321.         end = _tmp6_ + _tmp7_;
  322.     }
  323.     _tmp9_ = start;
  324.     if (_tmp9_ >= ((glong) 0)) {
  325.         glong _tmp10_ = 0L;
  326.         glong _tmp11_ = 0L;
  327.         _tmp10_ = start;
  328.         _tmp11_ = string_length;
  329.         _tmp8_ = _tmp10_ <= _tmp11_;
  330.     } else {
  331.         _tmp8_ = FALSE;
  332.     }
  333.     g_return_val_if_fail (_tmp8_, NULL);
  334.     _tmp13_ = end;
  335.     if (_tmp13_ >= ((glong) 0)) {
  336.         glong _tmp14_ = 0L;
  337.         glong _tmp15_ = 0L;
  338.         _tmp14_ = end;
  339.         _tmp15_ = string_length;
  340.         _tmp12_ = _tmp14_ <= _tmp15_;
  341.     } else {
  342.         _tmp12_ = FALSE;
  343.     }
  344.     g_return_val_if_fail (_tmp12_, NULL);
  345.     _tmp16_ = start;
  346.     _tmp17_ = end;
  347.     g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
  348.     _tmp18_ = start;
  349.     _tmp19_ = end;
  350.     _tmp20_ = start;
  351.     _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
  352.     result = _tmp21_;
  353.     return result;
  354. }
  355.  
  356.  
  357. static const gchar* string_to_string (const gchar* self) {
  358.     const gchar* result = NULL;
  359.     g_return_val_if_fail (self != NULL, NULL);
  360.     result = self;
  361.     return result;
  362. }
  363.  
  364.  
  365. static gboolean bool_parse (const gchar* str) {
  366.     gboolean result = FALSE;
  367.     const gchar* _tmp0_ = NULL;
  368.     g_return_val_if_fail (str != NULL, FALSE);
  369.     _tmp0_ = str;
  370.     if (g_strcmp0 (_tmp0_, "true") == 0) {
  371.         result = TRUE;
  372.         return result;
  373.     } else {
  374.         result = FALSE;
  375.         return result;
  376.     }
  377. }
  378.  
  379.  
  380. static gdouble double_parse (const gchar* str) {
  381.     gdouble result = 0.0;
  382.     const gchar* _tmp0_ = NULL;
  383.     gdouble _tmp1_ = 0.0;
  384.     g_return_val_if_fail (str != NULL, 0.0);
  385.     _tmp0_ = str;
  386.     _tmp1_ = g_ascii_strtod (_tmp0_, NULL);
  387.     result = _tmp1_;
  388.     return result;
  389. }
  390.  
  391.  
  392. static gchar* bool_to_string (gboolean self) {
  393.     gchar* result = NULL;
  394.     if (self) {
  395.         gchar* _tmp0_ = NULL;
  396.         _tmp0_ = g_strdup ("true");
  397.         result = _tmp0_;
  398.         return result;
  399.     } else {
  400.         gchar* _tmp1_ = NULL;
  401.         _tmp1_ = g_strdup ("false");
  402.         result = _tmp1_;
  403.         return result;
  404.     }
  405. }
  406.  
  407.  
  408. static gchar* double_to_string (gdouble self) {
  409.     gchar* result = NULL;
  410.     gchar* _tmp0_ = NULL;
  411.     gchar* _tmp1_ = NULL;
  412.     gint _tmp1__length1 = 0;
  413.     const gchar* _tmp2_ = NULL;
  414.     gchar* _tmp3_ = NULL;
  415.     gchar* _tmp4_ = NULL;
  416.     _tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
  417.     _tmp1_ = _tmp0_;
  418.     _tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
  419.     _tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
  420.     _tmp3_ = g_strdup (_tmp2_);
  421.     _tmp4_ = _tmp3_;
  422.     _tmp1_ = (g_free (_tmp1_), NULL);
  423.     result = _tmp4_;
  424.     return result;
  425. }
  426.  
  427.  
  428. static gchar* g_file_stream_read_line (FILE* self) {
  429.     gchar* result = NULL;
  430.     gint c = 0;
  431.     GString* ret = NULL;
  432.     GString* _tmp7_ = NULL;
  433.     g_return_val_if_fail (self != NULL, NULL);
  434.     ret = NULL;
  435.     while (TRUE) {
  436.         gint _tmp0_ = 0;
  437.         gint _tmp1_ = 0;
  438.         GString* _tmp2_ = NULL;
  439.         gint _tmp4_ = 0;
  440.         GString* _tmp5_ = NULL;
  441.         gint _tmp6_ = 0;
  442.         _tmp0_ = fgetc (self);
  443.         c = _tmp0_;
  444.         _tmp1_ = c;
  445.         if (!(_tmp1_ != EOF)) {
  446.             break;
  447.         }
  448.         _tmp2_ = ret;
  449.         if (_tmp2_ == NULL) {
  450.             GString* _tmp3_ = NULL;
  451.             _tmp3_ = g_string_new ("");
  452.             _g_string_free0 (ret);
  453.             ret = _tmp3_;
  454.         }
  455.         _tmp4_ = c;
  456.         if (_tmp4_ == ((gint) '\n')) {
  457.             break;
  458.         }
  459.         _tmp5_ = ret;
  460.         _tmp6_ = c;
  461.         g_string_append_c ((GString*) _tmp5_, (gchar) _tmp6_);
  462.     }
  463.     _tmp7_ = ret;
  464.     if (_tmp7_ == NULL) {
  465.         result = NULL;
  466.         _g_string_free0 (ret);
  467.         return result;
  468.     } else {
  469.         GString* _tmp8_ = NULL;
  470.         const gchar* _tmp9_ = NULL;
  471.         gchar* _tmp10_ = NULL;
  472.         _tmp8_ = ret;
  473.         _tmp9_ = ((GString*) _tmp8_)->str;
  474.         _tmp10_ = g_strdup (_tmp9_);
  475.         result = _tmp10_;
  476.         _g_string_free0 (ret);
  477.         return result;
  478.     }
  479.     _g_string_free0 (ret);
  480. }
  481.  
  482.  
  483. gint demo_hello_world_main (gchar** args, int args_length1) {
  484.     gint result = 0;
  485.     gchar* greeting = NULL;
  486.     gchar* _tmp0_ = NULL;
  487.     gchar* s1 = NULL;
  488.     const gchar* _tmp1_ = NULL;
  489.     gchar* _tmp2_ = NULL;
  490.     gchar* s2 = NULL;
  491.     const gchar* _tmp3_ = NULL;
  492.     gchar* _tmp4_ = NULL;
  493.     FILE* _tmp5_ = NULL;
  494.     const gchar* _tmp6_ = NULL;
  495.     const gchar* _tmp7_ = NULL;
  496.     const gchar* _tmp8_ = NULL;
  497.     const gchar* _tmp9_ = NULL;
  498.     gchar* _tmp10_ = NULL;
  499.     gchar* _tmp11_ = NULL;
  500.     gboolean b = FALSE;
  501.     gboolean _tmp12_ = FALSE;
  502.     gint i = 0;
  503.     gint _tmp13_ = 0;
  504.     gdouble d = 0.0;
  505.     gdouble _tmp14_ = 0.0;
  506.     FILE* _tmp15_ = NULL;
  507.     gboolean _tmp16_ = FALSE;
  508.     gchar* _tmp17_ = NULL;
  509.     gchar* _tmp18_ = NULL;
  510.     gint _tmp19_ = 0;
  511.     gchar* _tmp20_ = NULL;
  512.     gchar* _tmp21_ = NULL;
  513.     gdouble _tmp22_ = 0.0;
  514.     gchar* _tmp23_ = NULL;
  515.     gchar* _tmp24_ = NULL;
  516.     gchar* _tmp25_ = NULL;
  517.     gchar* _tmp26_ = NULL;
  518.     gchar* _tmp27_ = NULL;
  519.     gchar* _tmp28_ = NULL;
  520.     FILE* _tmp29_ = NULL;
  521.     const gchar* _tmp30_ = NULL;
  522.     const gchar* _tmp31_ = NULL;
  523.     const gchar* _tmp32_ = NULL;
  524.     const gchar* _tmp33_ = NULL;
  525.     gchar* _tmp34_ = NULL;
  526.     gchar* _tmp35_ = NULL;
  527.     FILE* _tmp36_ = NULL;
  528.     gint number = 0;
  529.     FILE* _tmp37_ = NULL;
  530.     gchar* _tmp38_ = NULL;
  531.     gchar* _tmp39_ = NULL;
  532.     gint _tmp40_ = 0;
  533.     gint _tmp41_ = 0;
  534.     FILE* _tmp42_ = NULL;
  535.     gint _tmp43_ = 0;
  536.     gint* arr = NULL;
  537.     gint* _tmp44_ = NULL;
  538.     gint arr_length1 = 0;
  539.     gint _arr_size_ = 0;
  540.     gint* _tmp45_ = NULL;
  541.     gint _tmp45__length1 = 0;
  542.     TestCls* t = NULL;
  543.     TestCls* _tmp48_ = NULL;
  544.     gint _tmp49_ = 0;
  545.     gint x = 0;
  546.     gint _tmp50_ = 0;
  547.     FILE* _tmp51_ = NULL;
  548.     gchar* _tmp52_ = NULL;
  549.     gchar* _tmp53_ = NULL;
  550.     gchar* _tmp54_ = NULL;
  551.     gchar* _tmp55_ = NULL;
  552.     _tmp0_ = g_strdup ("hello, world");
  553.     greeting = _tmp0_;
  554.     _tmp1_ = greeting;
  555.     _tmp2_ = string_slice (_tmp1_, (glong) 7, (glong) 12);
  556.     s1 = _tmp2_;
  557.     _tmp3_ = greeting;
  558.     _tmp4_ = string_slice (_tmp3_, (glong) (-4), (glong) (-2));
  559.     s2 = _tmp4_;
  560.     _tmp5_ = stdout;
  561.     _tmp6_ = s1;
  562.     _tmp7_ = string_to_string (_tmp6_);
  563.     _tmp8_ = s2;
  564.     _tmp9_ = string_to_string (_tmp8_);
  565.     _tmp10_ = g_strconcat ("s1 = ", _tmp7_, ", s2 = ", _tmp9_, "\n", NULL);
  566.     _tmp11_ = _tmp10_;
  567.     fprintf (_tmp5_, "%s", _tmp11_);
  568.     _g_free0 (_tmp11_);
  569.     _tmp12_ = bool_parse ("false");
  570.     b = _tmp12_;
  571.     _tmp13_ = atoi ("-52");
  572.     i = _tmp13_;
  573.     _tmp14_ = double_parse ("6.67428E-3");
  574.     d = _tmp14_;
  575.     _tmp15_ = stdout;
  576.     _tmp16_ = b;
  577.     _tmp17_ = bool_to_string (_tmp16_);
  578.     _tmp18_ = _tmp17_;
  579.     _tmp19_ = i;
  580.     _tmp20_ = g_strdup_printf ("%i", _tmp19_);
  581.     _tmp21_ = _tmp20_;
  582.     _tmp22_ = d;
  583.     _tmp23_ = double_to_string (_tmp22_);
  584.     _tmp24_ = _tmp23_;
  585.     _tmp25_ = g_strconcat ("b = ", _tmp18_, ", i = ", _tmp21_, ", d = ", _tmp24_, "\n", NULL);
  586.     _tmp26_ = _tmp25_;
  587.     fprintf (_tmp15_, "%s", _tmp26_);
  588.     _g_free0 (_tmp26_);
  589.     _g_free0 (_tmp24_);
  590.     _g_free0 (_tmp21_);
  591.     _g_free0 (_tmp18_);
  592.     _tmp27_ = bool_to_string (TRUE);
  593.     _g_free0 (s1);
  594.     s1 = _tmp27_;
  595.     _tmp28_ = g_strdup_printf ("%i", 21);
  596.     _g_free0 (s2);
  597.     s2 = _tmp28_;
  598.     _tmp29_ = stdout;
  599.     _tmp30_ = s1;
  600.     _tmp31_ = string_to_string (_tmp30_);
  601.     _tmp32_ = s2;
  602.     _tmp33_ = string_to_string (_tmp32_);
  603.     _tmp34_ = g_strconcat ("s1 = ", _tmp31_, ", s2 = ", _tmp33_, "\n", NULL);
  604.     _tmp35_ = _tmp34_;
  605.     fprintf (_tmp29_, "%s", _tmp35_);
  606.     _g_free0 (_tmp35_);
  607.     _tmp36_ = stdout;
  608.     fprintf (_tmp36_, "%d %g %s\n", 42, 3.1415, "Vala");
  609.     _tmp37_ = stdin;
  610.     _tmp38_ = g_file_stream_read_line (_tmp37_);
  611.     _tmp39_ = _tmp38_;
  612.     _tmp40_ = atoi (_tmp39_);
  613.     _tmp41_ = _tmp40_;
  614.     _g_free0 (_tmp39_);
  615.     number = _tmp41_;
  616.     _tmp42_ = stdout;
  617.     _tmp43_ = number;
  618.     fprintf (_tmp42_, "parsed: %d", _tmp43_);
  619.     _tmp44_ = g_new0 (gint, 5);
  620.     _tmp44_[0] = 3;
  621.     _tmp44_[1] = 9;
  622.     _tmp44_[2] = 2;
  623.     _tmp44_[3] = 7;
  624.     _tmp44_[4] = 5;
  625.     arr = _tmp44_;
  626.     arr_length1 = 5;
  627.     _arr_size_ = arr_length1;
  628.     _tmp45_ = arr;
  629.     _tmp45__length1 = arr_length1;
  630.     {
  631.         gint* a_collection = NULL;
  632.         gint a_collection_length1 = 0;
  633.         gint _a_collection_size_ = 0;
  634.         gint a_it = 0;
  635.         a_collection = _tmp45_;
  636.         a_collection_length1 = _tmp45__length1;
  637.         for (a_it = 0; a_it < _tmp45__length1; a_it = a_it + 1) {
  638.             gint a = 0;
  639.             a = a_collection[a_it];
  640.             {
  641.                 FILE* _tmp46_ = NULL;
  642.                 gint _tmp47_ = 0;
  643.                 _tmp46_ = stdout;
  644.                 _tmp47_ = a;
  645.                 fprintf (_tmp46_, "%d\n", _tmp47_);
  646.             }
  647.         }
  648.     }
  649.     _tmp48_ = test_cls_new ();
  650.     t = _tmp48_;
  651.     _tmp49_ = t->pTest;
  652.     t->pTest = _tmp49_ + 1;
  653.     _tmp50_ = test_cls_getVal (t);
  654.     x = _tmp50_;
  655.     _tmp51_ = stdout;
  656.     _tmp52_ = g_strdup_printf ("%i", x);
  657.     _tmp53_ = _tmp52_;
  658.     _tmp54_ = g_strconcat ("returned val = ", _tmp53_, "\n", NULL);
  659.     _tmp55_ = _tmp54_;
  660.     fprintf (_tmp51_, "%s", _tmp55_);
  661.     _g_free0 (_tmp55_);
  662.     _g_free0 (_tmp53_);
  663.     result = 0;
  664.     _test_cls_unref0 (t);
  665.     arr = (g_free (arr), NULL);
  666.     _g_free0 (s2);
  667.     _g_free0 (s1);
  668.     _g_free0 (greeting);
  669.     return result;
  670. }
  671.  
  672.  
  673. int main (int argc, char ** argv) {
  674. #if !GLIB_CHECK_VERSION (2,35,0)
  675.     g_type_init ();
  676. #endif
  677.     return demo_hello_world_main (argv, argc);
  678. }
  679.  
  680.  
  681. DemoHelloWorld* demo_hello_world_construct (GType object_type) {
  682.     DemoHelloWorld * self = NULL;
  683.     self = (DemoHelloWorld*) g_object_new (object_type, NULL);
  684.     return self;
  685. }
  686.  
  687.  
  688. DemoHelloWorld* demo_hello_world_new (void) {
  689.     return demo_hello_world_construct (DEMO_TYPE_HELLO_WORLD);
  690. }
  691.  
  692.  
  693. static void demo_hello_world_class_init (DemoHelloWorldClass * klass) {
  694.     demo_hello_world_parent_class = g_type_class_peek_parent (klass);
  695. }
  696.  
  697.  
  698. static void demo_hello_world_instance_init (DemoHelloWorld * self) {
  699. }
  700.  
  701.  
  702. GType demo_hello_world_get_type (void) {
  703.     static volatile gsize demo_hello_world_type_id__volatile = 0;
  704.     if (g_once_init_enter (&demo_hello_world_type_id__volatile)) {
  705.         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 };
  706.         GType demo_hello_world_type_id;
  707.         demo_hello_world_type_id = g_type_register_static (G_TYPE_OBJECT, "DemoHelloWorld", &g_define_type_info, 0);
  708.         g_once_init_leave (&demo_hello_world_type_id__volatile, demo_hello_world_type_id);
  709.     }
  710.     return demo_hello_world_type_id__volatile;
  711. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement