[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMapTable mishandles overwriting values

From: Richard Frith-Macdonald
Subject: Re: NSMapTable mishandles overwriting values
Date: Fri, 8 Mar 2002 07:13:32 +0000

On Thursday, March 7, 2002, at 10:09 PM, Alexander Malmberg wrote:


NSMapTable doesn't properly handle the case where you call NSMapInsert()
on a key that already has a value. Specifically:


I've attached a patch that fixes this. (It could be optimized to modify
the value in place with additional complexity.)

Actually, it has to do that to conform to the spec. - so I wrote that
change instead.  I also fixed a similar bug in the NSHashTable code.

I guess on my recent rewrite of these functions to use the GSI macros,
I forgot that the macros did not have these behaviors but were
simpler primitives.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]