mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
(NSStringFromMapTable): Instead of @%, use %s and [s cStringNoCopy].
(NSMapInsertKnownAbsent): Likewise. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1556 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e498c30b3b
commit
3d7bb17748
1 changed files with 6 additions and 5 deletions
|
@ -522,9 +522,9 @@ NSMapInsertKnownAbsent(NSMapTable *table, const void *key, const void *value)
|
||||||
* information. Not difficult to do, just something for a later
|
* information. Not difficult to do, just something for a later
|
||||||
* date. */
|
* date. */
|
||||||
[NSException raise:NSInvalidArgumentException
|
[NSException raise:NSInvalidArgumentException
|
||||||
format:@"NSMapTable: illegal reinsertion of: %@ -> %@",
|
format:@"NSMapTable: illegal reinsertion of: %s -> %s",
|
||||||
NSMT_DESCRIBE_KEY(table, key),
|
[NSMT_DESCRIBE_KEY(table, key) cStringNoCopy],
|
||||||
NSMT_DESCRIBE_VALUE(table, value)];
|
[NSMT_DESCRIBE_VALUE(table, value) cStringNoCopy]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -569,8 +569,9 @@ NSStringFromMapTable(NSMapTable *table)
|
||||||
/* Now, just step through the elements of the table, and add their
|
/* Now, just step through the elements of the table, and add their
|
||||||
* descriptions to the string. */
|
* descriptions to the string. */
|
||||||
while (NSNextMapEnumeratorPair(&enumerator, &key, &value))
|
while (NSNextMapEnumeratorPair(&enumerator, &key, &value))
|
||||||
[string appendFormat:@"%@ = %@;", (keyCallBacks.describe)(table, key),
|
[string appendFormat:@"%@ = %@;",
|
||||||
(valueCallBacks.describe)(table, value)];
|
[(keyCallBacks.describe)(table, key) cStringNoCopy],
|
||||||
|
[(valueCallBacks.describe)(table, value) cStringNoCopy]];
|
||||||
|
|
||||||
/* Note that this string'll need to be `retain'ed. */
|
/* Note that this string'll need to be `retain'ed. */
|
||||||
return string;
|
return string;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue