lfb-event: Avoid allocation when getting profile

We can return the const *. This makes it consistent with other getters.

This is an API change we didn't find any users and the API is declared
unstable.
This commit is contained in:
Guido Günther
2023-04-17 12:21:06 +02:00
parent 31a592e18e
commit 1a5cd090de
3 changed files with 9 additions and 9 deletions
+1 -3
View File
@@ -35,9 +35,7 @@ test_lfb_event_props (void)
g_object_set (event, "feedback-profile", "full", NULL);
g_object_get (event, "feedback-profile", &profile, NULL);
g_assert_cmpstr (profile, ==, "full");
g_free (profile);
profile = lfb_event_get_feedback_profile (event);
g_assert_cmpstr (profile, ==, "full");
g_assert_cmpstr (lfb_event_get_feedback_profile (event), ==, "full");
lfb_uninit ();
}