Re: [AD] SF.net SVN: alleg:[11915] allegro/branches/4.9/src

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


On 2009-03-22, Milan Mimica <milan.mimica@xxxxxxxxxx> wrote:
> Peter Wang wrote:
> > 
> > Can we not add an `unfilled' field to ALLEGRO_EXTRA_DISPLAY_SETTINGS,
> > initialise that to true, then before any operation working on an
> > ALLEGRO_EXTRA_DISPLAY_SETTINGS structure, check if `unfilled' is true
> > and call _al_fill_display_settings()?
> 
> See how I did it.

I'm pretty sure you meant that static variable in tls_get() to be
thread-local.

I still think _al_fill_display_settings() should be done in
_al_get_new_display_settings() though.

> The only problem with it is the fragility. Whenever a new 
> setting is added, tls.c will have to be updated.

In C you can write:

    int x[10] = {0};

Peter





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