Re: [AD] al_remove_config_value

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Oct 29, 2012 at 10:23 AM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
>
> You added al_remove_config_key.
> Would al_remove_config_entry be a better name to match
> al_get_first_config_entry, al_get_next_config_entry?
>
> On the other hand those two work with a data type
> called ALLEGRO_CONFIG_ENTRY.
>

Yes, I had al_remove_config_value first, but then realized someone
might think it searches for all entries with a certain value. So I
wanted to use al_remove_config_entry and yes, it implies an
ALLEGRO_CONFIG_ENTRY parameter. I was thinking about another function
which just finds the entry first - it kinda makes sense as the type is
nothing but an opaque iterator handle, something you usually are able
to pass to a remove function. But then I ended up just naming it
al_remove_config_key and a string parameter. This is one of the few
drawbacks of having just a bare C API available I guess... if we had
lots of cases where we deal with lists or trees we'd probably have to
define a general way how to do this.

Anyway, I also forgot to document it, but I see you already fixed that :)




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/