This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: use hashtab for pseudo op table
Richard Henderson <rth@redhat.com> writes:
> On Thu, May 05, 2005 at 11:58:06AM -0700, Zack Weinberg wrote:
>> > So, perhaps a slight bit of work on the libiberty hashtab api, to
>> > offer a few interfaces that take a) NUL-terminated strings b)
>> > fixed-size structs and maybe even c) variable sized structs with
>> > parameters specifying an offset and size within the struct where the
>> > sizeof the struct can be found, would make you reconsider?
>>
>> I'd feel better about the interface, but I'd still be concerned about
>> the constant factors. And I want support for not-NUL-terminated
>> strings with length passed in separately, too.
>
> The libiberty hash table doesn't need any changes to support this.
> The comparison function is asymmetric. It's therefore possible to
> compare two completely different items.
Won't horrible things happen when it tries to resize the table, if you
do that?
zw