Re: [AD] Config routines, alpha 5

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


On 2002-02-10, Angelo Mottola <a.mottola@xxxxxxxxxx> wrote:
> - more al_set_*/al_get_* functions: al_set/get_args come to mind.

How about the pointer idea?  Attached is a possible start. Originally
I made the free hook just like read/write hooks, but I ran into
problems during unload because the children had to be freed before the
parents.  Also, it incurred a cost whenever a variable that previously
existed was overwritten (it had to do the same look up of parents as
for read/write).

Instead of differentiating between int and float, maybe use doubles?
I read that doubles can represent anything that int can represent,
without information loss.  (If you accept my pointer + free_hook patch
then doubles wouldn't expand the size of the ENTRY_DATA union.)

BTW, why did you use ENTRY_HAS_READ_HOOK/ENTRY_HAS_WRITE_HOOK flags?
I thought it would be easier just to compare against
read_hook/write_hook, since you are doing that anyway.

Attachment: config5-ptr.diff.gz
Description: application/gunzip



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