mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
Bugfixes suggested by Benhur-de-Oliveira.Stein@imag.fr
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3555 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
19b8cf05de
commit
29132b8bad
5 changed files with 38 additions and 7 deletions
|
@ -1,3 +1,12 @@
|
|||
Mon Jan 11 16:45:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
Fixes for bugs reported by Benhur-de-Oliveira.Stein@imag.fr
|
||||
* src/NSDictionary.m: ([-initWithObjectsAndKeys:]) fixed test for nil.
|
||||
* src/NSSet.m: Added makeObjectsPerformSelector methods.
|
||||
* src/NSString.m: ([-rangeOfComposedCharacterSequenceAtIndex:]) find
|
||||
range from before the index if necessary.
|
||||
* Tidied allocation methods in NSArray.m NSDictionary.m
|
||||
|
||||
Sat Jan 8 6:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* src/NSPortNameServer.m: Raise exception on failure to register name.
|
||||
|
|
|
@ -85,7 +85,9 @@ static Class NSMutableArray_concrete_class;
|
|||
|
||||
+ allocWithZone: (NSZone*)z
|
||||
{
|
||||
return NSAllocateObject ([self _concreteClass], 0, z);
|
||||
if ([self class] == [NSArray class])
|
||||
return NSAllocateObject ([self _concreteClass], 0, z);
|
||||
return [super allocWithZone: z];
|
||||
}
|
||||
|
||||
+ array
|
||||
|
@ -707,7 +709,9 @@ static NSString *indentStrings[] = {
|
|||
|
||||
+ allocWithZone: (NSZone*)z
|
||||
{
|
||||
return NSAllocateObject ([self _mutableConcreteClass], 0, z);
|
||||
if ([self class] == [NSMutableArray class])
|
||||
return NSAllocateObject ([self _mutableConcreteClass], 0, z);
|
||||
return [super allocWithZone: z];
|
||||
}
|
||||
|
||||
/* This is the desgnated initializer for NSMutableArray */
|
||||
|
|
|
@ -77,7 +77,9 @@ static Class NSMutableDictionary_concrete_class;
|
|||
|
||||
+ allocWithZone: (NSZone*)z
|
||||
{
|
||||
return NSAllocateObject([self _concreteClass], 0, z);
|
||||
if ([self class] == [NSDictionary class])
|
||||
return NSAllocateObject([self _concreteClass], 0, z);
|
||||
return [super allocWithZone: z];
|
||||
}
|
||||
|
||||
/* This is the designated initializer */
|
||||
|
@ -227,7 +229,7 @@ static Class NSMutableDictionary_concrete_class;
|
|||
int argi = 1;
|
||||
|
||||
va_start (ap, firstObject);
|
||||
if (firstObject != nil)
|
||||
if (firstObject == nil)
|
||||
{
|
||||
return [self init];
|
||||
}
|
||||
|
@ -682,7 +684,9 @@ static NSString *indentStrings[] = {
|
|||
|
||||
+ allocWithZone: (NSZone*)z
|
||||
{
|
||||
return NSAllocateObject([self _mutableConcreteClass], 0, z);
|
||||
if ([self class] == [NSMutableDictionary class])
|
||||
return NSAllocateObject([self _mutableConcreteClass], 0, z);
|
||||
return [super allocWithZone: z];
|
||||
}
|
||||
|
||||
/* This is the designated initializer */
|
||||
|
|
|
@ -338,6 +338,20 @@ static Class NSMutableSet_concrete_class;
|
|||
[o performSelector:aSelector];
|
||||
}
|
||||
|
||||
- (void) makeObjectsPerformSelector: (SEL)aSelector
|
||||
{
|
||||
id o, e = [self objectEnumerator];
|
||||
while ((o = [e nextObject]))
|
||||
[o performSelector:aSelector];
|
||||
}
|
||||
|
||||
- (void) makeObjectsPerformSelector: (SEL)aSelector withObject:argument
|
||||
{
|
||||
id o, e = [self objectEnumerator];
|
||||
while ((o = [e nextObject]))
|
||||
[o performSelector:aSelector withObject: argument];
|
||||
}
|
||||
|
||||
- (void) makeObjectsPerform: (SEL)aSelector withObject:argument
|
||||
{
|
||||
id o, e = [self objectEnumerator];
|
||||
|
|
|
@ -1287,8 +1287,8 @@ handle_printf_atsign (FILE *stream,
|
|||
unsigned int start, end;
|
||||
|
||||
start=anIndex;
|
||||
while(uni_isnonsp([self characterAtIndex: start]))
|
||||
start++;
|
||||
while(uni_isnonsp([self characterAtIndex: start]) && start > 0)
|
||||
start--;
|
||||
end=start+1;
|
||||
if(end < [self length])
|
||||
while((end < [self length]) && (uni_isnonsp([self characterAtIndex: end])) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue