mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-03 01:50:55 +00:00
([NSGDictionaryObjectEnumerator -nextObject]): Return the key, not the
object. ([NSGDictionary -objectForKey:]): Method moved from NSGMutableDictionary. ([NSGMutableDictionary +initialize]): Don't use static variable in test. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1370 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6ae9416376
commit
062a995fe7
1 changed files with 12 additions and 15 deletions
|
@ -49,7 +49,8 @@
|
||||||
- nextObject
|
- nextObject
|
||||||
{
|
{
|
||||||
id k;
|
id k;
|
||||||
return [dictionary nextObjectAndKey: &k withEnumState: &enum_state];
|
[dictionary nextObjectAndKey: &k withEnumState: &enum_state];
|
||||||
|
return k;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
|
@ -80,7 +81,14 @@
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
if (self == [NSGDictionary class])
|
if (self == [NSGDictionary class])
|
||||||
class_add_behavior([NSGDictionary class], [Dictionary class]);
|
behavior_class_add_class (self, [Dictionary class]);
|
||||||
|
}
|
||||||
|
|
||||||
|
- objectForKey: aKey
|
||||||
|
{
|
||||||
|
/* xxx Should I change the method name in Dictionary?
|
||||||
|
I don't really want to; I think "at" is better. */
|
||||||
|
return [self objectAtKey: aKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -99,12 +107,8 @@
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
static int done = 0;
|
if (self == [NSGMutableDictionary class])
|
||||||
if (!done)
|
behavior_class_add_class (self, [NSGDictionary class]);
|
||||||
{
|
|
||||||
done = 1;
|
|
||||||
class_add_behavior([NSGMutableDictionary class], [NSGDictionary class]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is the designated initializer */
|
/* This is the designated initializer */
|
||||||
|
@ -117,13 +121,6 @@
|
||||||
[self putObject: anObject atKey: aKey];
|
[self putObject: anObject atKey: aKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
- objectForKey: aKey
|
|
||||||
{
|
|
||||||
/* xxx Should I change the method name in Dictionary?
|
|
||||||
I don't really want to; I think "at" is better. */
|
|
||||||
return [self objectAtKey: aKey];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) removeObjectForKey:(NSString *)aKey
|
- (void) removeObjectForKey:(NSString *)aKey
|
||||||
{
|
{
|
||||||
[self removeObjectAtKey: aKey];
|
[self removeObjectAtKey: aKey];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue