Checks for illegal comparator return values.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5349 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-12-01 19:36:20 +00:00
parent 1a846e2eee
commit c3fb857b06
5 changed files with 155 additions and 46 deletions

View file

@ -2476,20 +2476,30 @@ handle_printf_atsign (FILE *stream,
// Creating Temporary Strings
+ (NSMutableString*) string
{
return AUTORELEASE([[NSMutableString_c_concrete_class allocWithZone:
NSDefaultMallocZone()] initWithCapacity: 0]);
}
+ (NSMutableString*) stringWithCapacity: (unsigned)capacity
{
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
initWithCapacity: capacity]);
return AUTORELEASE([[NSMutableString_c_concrete_class allocWithZone:
NSDefaultMallocZone()] initWithCapacity: capacity]);
}
/* Inefficient. */
+ (NSString*) stringWithCharacters: (const unichar*)characters
length: (unsigned)length
{
id n;
n = [[self allocWithZone: NSDefaultMallocZone()]
initWithCharacters: characters length: length];
return AUTORELEASE(n);
return AUTORELEASE([[NSMutableString_c_concrete_class allocWithZone:
NSDefaultMallocZone()] initWithCharacters: characters length: length]);
}
+ (id) stringWithContentsOfFile: (NSString *)path
{
return AUTORELEASE([[NSMutableString_c_concrete_class allocWithZone:
NSDefaultMallocZone()] initWithContentsOfFile: path]);
}
+ (NSString*) stringWithCString: (const char*)byteString