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:
@@ -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 ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user