/* parser_var_type_nullable.c generated by valac, the Vala compiler * generated from parser_var_type_nullable.vala, do not modify */ #include #include #include #define _g_free0(var) (var = (g_free (var), NULL)) static void _vala_main (void); static void _vala_array_destroy (gpointer array, gssize array_length, GDestroyNotify destroy_func); static void _vala_array_free (gpointer array, gssize array_length, GDestroyNotify destroy_func); static void _vala_main (void) { { gchar* foo = NULL; gchar* _tmp0_; _tmp0_ = g_strdup ("foo"); foo = _tmp0_; _g_free0 (foo); } { const gchar* foo = NULL; foo = "foo"; } { gchar* _tmp1_; gchar* _tmp2_; gchar** _tmp3_; _tmp1_ = g_strdup ("foo"); _tmp2_ = g_strdup ("bar"); _tmp3_ = g_new0 (gchar*, 2 + 1); _tmp3_[0] = _tmp1_; _tmp3_[1] = _tmp2_; { gchar** foo_collection = NULL; gint foo_collection_length1 = 0; gint _foo_collection_size_ = 0; gint foo_it = 0; foo_collection = _tmp3_; foo_collection_length1 = 2; for (foo_it = 0; foo_it < foo_collection_length1; foo_it = foo_it + 1) { gchar* _tmp4_; gchar* foo = NULL; _tmp4_ = g_strdup (foo_collection[foo_it]); foo = _tmp4_; { _g_free0 (foo); } } foo_collection = (_vala_array_free (foo_collection, foo_collection_length1, (GDestroyNotify) g_free), NULL); } } { gchar* _tmp5_; gchar* _tmp6_; gchar** _tmp7_; _tmp5_ = g_strdup ("foo"); _tmp6_ = g_strdup ("bar"); _tmp7_ = g_new0 (gchar*, 2 + 1); _tmp7_[0] = _tmp5_; _tmp7_[1] = _tmp6_; { gchar** foo_collection = NULL; gint foo_collection_length1 = 0; gint _foo_collection_size_ = 0; gint foo_it = 0; foo_collection = _tmp7_; foo_collection_length1 = 2; for (foo_it = 0; foo_it < foo_collection_length1; foo_it = foo_it + 1) { const gchar* foo = NULL; foo = foo_collection[foo_it]; { } } foo_collection = (_vala_array_free (foo_collection, foo_collection_length1, (GDestroyNotify) g_free), NULL); } } { { gchar* foo = NULL; gchar* _tmp8_; _tmp8_ = g_strdup ("foo"); foo = _tmp8_; _g_free0 (foo); } } { { const gchar* foo = NULL; foo = "foo"; } } } int main (int argc, char ** argv) { _vala_main (); return 0; } static void _vala_array_destroy (gpointer array, gssize array_length, GDestroyNotify destroy_func) { if ((array != NULL) && (destroy_func != NULL)) { gssize i; for (i = 0; i < array_length; i = i + 1) { if (((gpointer*) array)[i] != NULL) { destroy_func (((gpointer*) array)[i]); } } } } static void _vala_array_free (gpointer array, gssize array_length, GDestroyNotify destroy_func) { _vala_array_destroy (array, array_length, destroy_func); g_free (array); }