mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-23 21:52:13 +00:00
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:
parent
1a846e2eee
commit
c3fb857b06
5 changed files with 155 additions and 46 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue