On 07/09/2017 05:51 PM, Emilio G. Cota wrote:
On Sun, Jul 09, 2017 at 11:38:50 -1000, Richard Henderson wrote:
On 07/08/2017 09:50 PM, Emilio G. Cota wrote:
(snip)
I think it would be better to have a tb_htable_lookup_or_insert function,
which performs the insert iff a matching object isn't already there,
returning the entry which *is* there in either case.

qht_insert behaves exactly like this, except that it returns a bool.
But we could make it return a void *.

Err.. no it doesn't. It returns false if the *exact same object* is inserted twice. That's not the same as being passed a qht_lookup_func_t to see if two different objects compare equal.


r~

Reply via email to