[PATCH 1/2] oleaut32: Convert ITypeInfo implementation to use standard linked list
Andrew Eikum
aeikum at codeweavers.com
Mon Dec 13 09:41:48 CST 2010
On 12/13/2010 05:34 AM, Alexandre Julliard wrote:
> Andrew Eikum<aeikum at codeweavers.com> writes:
>
>> - /* search element n in list */
>> - for(i=0; i< index; i++)
>> + i = 0;
>> + LIST_FOR_EACH_ENTRY (pTypeInfo,&This->typeinfo_list, ITypeInfoImpl, entry)
>> + {
>> + if(i>= index)
>> + break;
>> + ++i;
>> + }
>
> It looks like an array would be more appropriate than a list.
>
An array would work, especially for the static structures that are used
now, but these cleanup patches were made with the goal of merging the
typelib-reading and typelib-creation interfaces in mind. Specifically,
implementing the typelib-creation interfaces using the current data
structures in typelib.c. Given the function
ICreateTypeLib::CreateTypeInfo(), a list seems more appropriate to me.
More information about the wine-devel
mailing list