Changed keys argument type to (const id <NSCopying>[]) in

-[NSDictionary initWithObjects:forKeys:count:] and 
+dictionaryWithObjects:forKeys:count:, to follow the current Cocoa API.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37431 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Quentin Mathe 2013-12-05 13:16:36 +00:00
parent 805cf33e93
commit 52fa3a2c07
6 changed files with 24 additions and 13 deletions

View file

@ -185,7 +185,7 @@ static SEL objSel;
/* Designated initialiser */
- (id) initWithObjects: (const id[])objs
forKeys: (const id[])keys
forKeys: (const id <NSCopying>[])keys
count: (NSUInteger)c
{
NSUInteger i;
@ -208,7 +208,7 @@ static SEL objSel;
format: @"Tried to init dictionary with nil value"];
}
node = GSIMapNodeForKey(&map, (GSIMapKey)keys[i]);
node = GSIMapNodeForKey(&map, (GSIMapKey)(id)keys[i]);
if (node)
{
IF_NO_GC(RETAIN(objs[i]));
@ -217,7 +217,7 @@ static SEL objSel;
}
else
{
GSIMapAddPair(&map, (GSIMapKey)keys[i], (GSIMapVal)objs[i]);
GSIMapAddPair(&map, (GSIMapKey)(id)keys[i], (GSIMapVal)objs[i]);
}
}
return self;