[3000] in BarnOwl Developers
Re: [PATCH] Don't call owl_list_create in owl_dict_get_keys
daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Thu Mar 24 02:41:34 2011
Date: Thu, 24 Mar 2011 02:41:30 -0400 (EDT)
From: Anders Kaseorg <andersk@MIT.EDU>
To: David Benjamin <davidben@mit.edu>
cc: barnowl-dev@mit.edu
In-Reply-To: <1299615518-16207-1-git-send-email-davidben@mit.edu>
A number of comments that you didn=E2=80=99t change have become misleading:
/* free the list with owl_cmddict_namelist_cleanup */
void owl_cmddict_get_names(const owl_cmddict *d, owl_list *l) {
owl_dict_get_keys(d, l);
}
/* creates a list and fills it in with keys. duplicates the keys,=20
* so they will need to be freed by the caller. */
int owl_global_get_style_names(const owl_global *g, owl_list *l) {
return owl_dict_get_keys(&(g->styledict), l);
}
/* free the list with owl_cmddict_namelist_cleanup */
void owl_keyhandler_get_keymap_names(const owl_keyhandler *kh, owl_list *l=
)
{
owl_dict_get_keys(&kh->keymaps, l);
}
/* free the list with owl_variable_dict_namelist_cleanup */
void owl_variable_dict_get_names(const owl_vardict *d, owl_list *l) {
owl_dict_get_keys(d, l);
}
owl_cmddict_namelist_cleanup and owl_variable_dict_namelist_cleanup should=
=20
go away entirely since they are no longer the inverse of any operation.
Otherwise LGTM.
Anders