mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
* Source/GSString.m: Remove code that was identical to super class.
This commit is contained in:
parent
b36412d20f
commit
760d6ad990
2 changed files with 3 additions and 105 deletions
|
@ -1,8 +1,9 @@
|
||||||
2018-06-28 Fred Kiefer <fredkiefer@gmx.de>
|
2018-07-01 Fred Kiefer <fredkiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSString.m: Small cleanup for printf registration.
|
* Source/NSString.m: Small cleanup for printf registration.
|
||||||
* Tests/base/NSString/test00.m: Add David Chisnall's test from
|
* Tests/base/NSString/test00.m: Add David Chisnall's test from
|
||||||
newapi branch slightly reformatted.
|
newapi branch slightly reformatted.
|
||||||
|
* Source/GSString.m: Remove code that was identical to super class.
|
||||||
|
|
||||||
2018-06-28 Richard Frith-Macdonald <rfm@gnu.org>
|
2018-06-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -1542,42 +1542,6 @@ fixBOM(unsigned char **bytes, NSUInteger*length, BOOL *owned,
|
||||||
return (id)me;
|
return (id)me;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCharacters: (const unichar*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
{
|
|
||||||
return [self initWithBytes: (const void*)chars
|
|
||||||
length: length * sizeof(unichar)
|
|
||||||
encoding: NSUnicodeStringEncoding];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCharactersNoCopy: (unichar*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
freeWhenDone: (BOOL)flag
|
|
||||||
{
|
|
||||||
return [self initWithBytesNoCopy: (void*)chars
|
|
||||||
length: length * sizeof(unichar)
|
|
||||||
encoding: NSUnicodeStringEncoding
|
|
||||||
freeWhenDone: flag];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCString: (const char*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
{
|
|
||||||
return [self initWithBytes: (const void*)chars
|
|
||||||
length: length
|
|
||||||
encoding: externalEncoding];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCStringNoCopy: (char*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
freeWhenDone: (BOOL)flag
|
|
||||||
{
|
|
||||||
return [self initWithBytesNoCopy: (void*)chars
|
|
||||||
length: length
|
|
||||||
encoding: externalEncoding
|
|
||||||
freeWhenDone: flag];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithFormat: (NSString*)format
|
- (id) initWithFormat: (NSString*)format
|
||||||
locale: (NSDictionary*)locale
|
locale: (NSDictionary*)locale
|
||||||
arguments: (va_list)argList
|
arguments: (va_list)argList
|
||||||
|
@ -3760,23 +3724,6 @@ transmute(GSStr self, NSString *aString)
|
||||||
return self->_flags.hash;
|
return self->_flags.hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithBytes: (const void*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
encoding: (NSStringEncoding)encoding
|
|
||||||
{
|
|
||||||
if (length > 0)
|
|
||||||
{
|
|
||||||
void *tmp = NSZoneMalloc([self zone], length);
|
|
||||||
|
|
||||||
memcpy(tmp, chars, length);
|
|
||||||
chars = tmp;
|
|
||||||
}
|
|
||||||
return [self initWithBytesNoCopy: (void*)chars
|
|
||||||
length: length
|
|
||||||
encoding: encoding
|
|
||||||
freeWhenDone: YES];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithBytesNoCopy: (void*)chars
|
- (id) initWithBytesNoCopy: (void*)chars
|
||||||
length: (NSUInteger)length
|
length: (NSUInteger)length
|
||||||
encoding: (NSStringEncoding)encoding
|
encoding: (NSStringEncoding)encoding
|
||||||
|
@ -3791,57 +3738,6 @@ transmute(GSStr self, NSString *aString)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCharacters: (const unichar*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
{
|
|
||||||
return [self initWithBytes: chars
|
|
||||||
length: length * sizeof(unichar)
|
|
||||||
encoding: NSUnicodeStringEncoding];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCharactersNoCopy: (unichar*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
freeWhenDone: (BOOL)flag
|
|
||||||
{
|
|
||||||
return [self initWithBytesNoCopy: chars
|
|
||||||
length: length * sizeof(unichar)
|
|
||||||
encoding: NSUnicodeStringEncoding
|
|
||||||
freeWhenDone: flag];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCString: (const char*)chars
|
|
||||||
{
|
|
||||||
return [self initWithBytes: chars
|
|
||||||
length: strlen(chars)
|
|
||||||
encoding: externalEncoding];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCString: (const char*)chars
|
|
||||||
encoding: (NSStringEncoding)encoding
|
|
||||||
{
|
|
||||||
return [self initWithBytes: chars
|
|
||||||
length: strlen(chars)
|
|
||||||
encoding: encoding];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCString: (const char*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
{
|
|
||||||
return [self initWithBytes: chars
|
|
||||||
length: length
|
|
||||||
encoding: externalEncoding];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id) initWithCStringNoCopy: (char*)chars
|
|
||||||
length: (NSUInteger)length
|
|
||||||
freeWhenDone: (BOOL)flag
|
|
||||||
{
|
|
||||||
return [self initWithBytesNoCopy: chars
|
|
||||||
length: length
|
|
||||||
encoding: externalEncoding
|
|
||||||
freeWhenDone: flag];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL) makeImmutable
|
- (BOOL) makeImmutable
|
||||||
{
|
{
|
||||||
return YES;
|
return YES;
|
||||||
|
@ -4384,6 +4280,7 @@ agree, create a new GSCInlineString otherwise.
|
||||||
{
|
{
|
||||||
return getCStringE_u((GSStr)self, buffer, maxLength, encoding);
|
return getCStringE_u((GSStr)self, buffer, maxLength, encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) getCString: (char*)buffer
|
- (void) getCString: (char*)buffer
|
||||||
maxLength: (NSUInteger)maxLength
|
maxLength: (NSUInteger)maxLength
|
||||||
range: (NSRange)aRange
|
range: (NSRange)aRange
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue