[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hash locate_matching_entry()
From: |
Ben Pfaff |
Subject: |
Re: hash locate_matching_entry() |
Date: |
Tue, 14 Oct 2008 21:47:10 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Jason Stover <address@hidden> writes:
> On Wed, Oct 08, 2008 at 10:25:19AM -0400, Jason Stover wrote:
>> Should this line be:
>>
>> if (entry == NULL || h->compare (entry, target, h->aux))
>
> John just clarified over IRC that the return value here is supposed to be
> strcmp-ish: 0 for a match.
This convention is always slightly confusing. I think I'm going
to start trying to use the suffix "_3way" on functions that do
3-way strcmp-like comparisons, following the pattern of the C++
STL function lexicographical_compare_3way().
--
Ben Pfaff
http://benpfaff.org