[2/5] libwine: Add a generic red-black tree.

Alexandre Julliard julliard at winehq.org
Tue Jun 2 14:52:39 CDT 2009


Henri Verbeet <hverbeet at codeweavers.com> writes:

> Alexandre Julliard wrote:
>> You can't hardcode malloc(), the allocator needs to be configurable,
>> particularly for use from the memory management code. Also printing an
>> ERR in that sort of code is not acceptable, errors need to be propagated
>> correctly and handled by the user.
>>
>> I also still think this would be better as inline functions, at least
>> until it stabilizes. We don't want to change the libwine interface any
>> more than strictly necessary.
>>
> How about something like the attached patch?

Yes, that looks fine. It would probably look nicer to merge the
allocator and the compare function into a single structure, and just
store a pointer to it like a vtbl; but that's a minor detail.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list