URL:
  <http://savannah.gnu.org/bugs/?28158>

                 Summary: NSMutableDictionary is broken for lookup using
GSUnicodeInlineString key
                 Project: GNUstep
            Submitted by: theeggcamefirst
            Submitted on: Thu 03 Dec 2009 11:41:57 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Something is seriously broken in NSMutableDictionary with respect to
GSUnicodeInlineString keys, as seen in this transcript from gdb. As you can
see, the dictionary wasn't able to retrieve the object when the key was that
type of string. This is using the latest tip of the trunk (r29095) but I think
it has been broken for a while. This issue didn't exist back in r28259 or so.

(gdb) p [aKey hash]
$12 = 111128
(gdb) p [@"cat" hash]
$13 = 111128
(gdb) p [aKey isEqual:@"cat"]
$14 = 1 '\001'
(gdb) p [aKey isEqualToString:@"cat"]
$15 = 1 '\001'
(gdb) po theDict
{cat = "(species:\"feline\")"; "first name" = Mike; }
(gdb) p [theDict objectForKey:@"cat"]
$16 = (struct objc_object *) 0x83f3ef0
(gdb) p [theDict objectForKey:aKey]
$17 = (struct objc_object *) 0x0
(gdb) po [@"cat" class]
GSCBufferString
(gdb) po [aKey class]
GSUnicodeInlineString
(gdb) po [theDict class]
GSMutableDictionary
(gdb) 






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28158>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to