RE: [AD] Allegro 5 new config routines, alpha 1

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


Title: RE: [AD] Allegro 5 new config routines, alpha 1

> > - i would add a pointer type (would obviously not be read/written
> >   from/to disk, but done at run time by the user).
>
> Are you thinking what I think you're thinking?  With it, We wouldn't
> need to support multiple userdata fields in structures: simply use the
> address of the structure in the key, e.g. "/myapp/0xbeefcafe/prop". A
> userdata field in BITMAPs would still be good (maybe to cache the key
> name?), but most other structures can probably do without.

More or less. I saw this as an opportunity to offer the user a simple
hash table API, the only problem being that the actual hashing might
need users to supply their own hash function, as hashing pointers
might not be optimal (and you couldn't hash to the same value different
pointers pointing to semantically equal objects). Could be used for
this extra field, but for anything else that might require hashes.

> > - i'm still not too comfortable with having to go through a number
> >   of hash lookups just to find out whether a key is down or not,
> >   but that's another story entirely :)
>
> Let's hope it's only an example :-)

Let's hope indeed ;)

--
Vincent Penquerc'h



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