#include "test.h" #include #include static Test* app_y; static GThread* app_u; static void* _app_thread_func_gthread_func (gpointer self); static void app_test (void); static gint app_main (char** args, int args_length1); gint test_foo (Test* self, gint bar) { g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (bar > 0, 0); return bar + self->x; } Test* test_new (void) { Test* self; self = g_slice_new0 (Test); return self; } void test_free (Test* self) { g_slice_free (Test, self); } void* app_thread_func (void) { gint t; t = 0; t = test_foo (app_y, 99); g_message ("test.vala:21: %d", t); return NULL; } static void* _app_thread_func_gthread_func (gpointer self) { return app_thread_func (); } static void app_test (void) { GError * inner_error; Test* t; gint j; Test* _tmp1; Test* _tmp0; inner_error = NULL; t = test_new (); j = 0; j = test_foo (t, 100); g_message ("test.vala:31: %d", j); _tmp1 = NULL; _tmp0 = NULL; app_y = (_tmp1 = (_tmp0 = t, t = NULL, _tmp0), (app_y == NULL ? NULL : (app_y = (test_free (app_y), NULL))), _tmp1); app_u = g_thread_create (_app_thread_func_gthread_func, NULL, TRUE, &inner_error); (t == NULL ? NULL : (t = (test_free (t), NULL))); } static gint app_main (char** args, int args_length1) { app_test (); g_thread_join (app_u); return 1; } int main (int argc, char ** argv) { g_thread_init (NULL); g_type_init (); return app_main (argv, argc); } App* app_new (void) { App* self; self = g_slice_new0 (App); return self; } void app_free (App* self) { g_slice_free (App, self); }