int main (int argc, char **argv) { int status = 0; g_autoptr(GsApplication) application = NULL; g_autoptr(GsDebug) debug = gs_debug_new (); g_autoptr(AsProfile) profile = NULL; g_autoptr(AsProfileTask) ptask = NULL; setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); profile = as_profile_new (); as_profile_set_duration_min (profile, 1); ptask = as_profile_start_literal (profile, "GsMain"); g_assert (ptask != NULL); /* redirect logs */ application = gs_application_new (); status = g_application_run (G_APPLICATION (application), argc, argv); return status; }
int main (int argc, char **argv) { int status = 0; _cleanup_object_unref_ GsApplication *application = NULL; _cleanup_object_unref_ GsProfile *profile = NULL; setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); profile = gs_profile_new (); gs_profile_start (profile, "GsMain"); application = gs_application_new (); status = g_application_run (G_APPLICATION (application), argc, argv); gs_profile_stop (profile, "GsMain"); return status; }