<commit_before>#include "gtk.h"
#include "../../util/cache.h"
#include "../../util/debug.h"

extern struct perf_error_ops perf_gtk_eops;

int perf_gtk__init(void)
{
	perf_error__register(&perf_gtk_eops);
	perf_gtk__init_helpline();
	return gtk_init_check(NULL, NULL) ? 0 : -1;
}

void perf_gtk__exit(bool wait_for_ok __used)
{
	perf_error__unregister(&perf_gtk_eops);
	gtk_main_quit();
}<commit_msg>perf ui gtk: Ensure not to call gtk_main_quit() twice<commit_after>#include "gtk.h"
#include "../../util/cache.h"
#include "../../util/debug.h"

extern struct perf_error_ops perf_gtk_eops;

int perf_gtk__init(void)
{
	perf_error__register(&perf_gtk_eops);
	perf_gtk__init_helpline();
	return gtk_init_check(NULL, NULL) ? 0 : -1;
}

void perf_gtk__exit(bool wait_for_ok __used)
{
	if (!perf_gtk__is_active_context(pgctx))
		return;
	perf_error__unregister(&perf_gtk_eops);
	gtk_main_quit();
}
{'fraction_non_alphanumeric': 0.14269662921348314, 'fraction_numerical': 0.0044943820224719105, 'mean_word_length': 6.015748031496063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '88789', 'n_tokens_mistral': 379, 'n_tokens_neox': 359, 'n_words': 61}