Example of finding group and pref by name:
StashGroup *group = stash_group_get_group_by_name("cup");
if (group) {
StashPref *pref = stash_group_get_pref_by_name(group, "price");
if (pref) {
msgwin_status_add("%s.%s = %f", group->name, pref->key_name, *(gdouble *)pref->setting);
} else {
msgwin_status_add("pref not found");
}
} else {
msgwin_status_add("group not found");
}
Problem: Doesn't work if used after stash_group_free()
.
In addition to reviewing memory management... Some potential solutions:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.