Re: [AD] load_datafile_object with properties

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


On Sun, 2002-10-13 at 10:05, Eric Botcazou wrote:
> > Changing to a linked list required many changes in the datafile tools
> > (see my patch), so if you want, I can still send a fixed version of my
> > first patch using arrays, and only changing datafile.c. But I remember,
> > there are other changes going on in the datafile tools, so maybe now is
> > a good time for this anyway?
> 
> I didn't realize that switching to a linked list involves so many changes...
> the question is now: are they really worth implementing ? I don't think many
> users attach more than 64 properties to their objects.

The 64 properties limit would also be removed by the dynamic array
solution. The only reason for a fixed array was probably speed reasons,
but I don't think this matters much in load_datafile[_object].

All I'd like to be changed is to read in properties with
load_datafile_object. The linked-list question is, do we want a better
container-type, or do we want the dat utilities to stay compatible.
There aren't really that many changes, only the dat utilities loop
through the properties list at some places.

> > I didn't adapt the dat2c and dat2s programs yet, because I'm not sure
> > what's the best way to hard-code a linked list, all solutions without
> > some sort of constructor function seem to either require many variables
> > or be a bit hackish. So be warned, the patch breaks them both.
> 
> Ah! yes, dat2s/c don't play nice with linked lists.
> 

Laurence said he already has a solution for dat2c. And dat2s doesn't
seem to care about properties at all right now.

> Have you already written the fixed version of your original patch you talk
> about above ? If so, post it on the list, I now think it's the most
> reasonable solution (and Allegro already uses this type of container for its
> gfx mode list fetching code). If no, I'll write it myself as a due
> punishment for not thinking about the consequences of my suggestion :-(
> 

Writing Allegro code as a punishment? I don't believe in this effect :)
But anyway, I don't have it ready, and I'm not sure I'll have any time
for it right now (else I'd have adjusted my last patch to the errno
changes by now..) - so if you want, you can do it.

--
Elias Pschernig



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