mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
* Changes so additions compiles on older Mac OS X 10.1.5
* Source/Additions/GCArray.m (-copyWithZone:): Use more standard array initialization method. (mutableCopyWithZone:, [GCMutableArray -copyWithZone:], [GCMutableArray -mutableCopyWithZone:]): Idem. * Source/Additions/GSCategories.m ([NSData -hexadecimalRepresentation]): Use identically functioning, but older, standard data initialization. * Source/Additions/GSCategories.m ([NSMutableString -replaceString:withString:]): Rewrite to use older, standard methods. * Tools/AGSHtml.m ([AGSHtml -outputNode:to:]): Use GNUstep addition method to replace string. * Tools/autogsdoc.m (main): Idem. (Patch from Markus Hitter). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20448 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bedca778cd
commit
531dd954e2
5 changed files with 68 additions and 32 deletions
|
@ -135,7 +135,7 @@
|
|||
dst[dpos++] = hexChars[c & 0x0f];
|
||||
}
|
||||
data = [NSData allocWithZone: NSDefaultMallocZone()];
|
||||
data = [data initWithBytesNoCopy: dst length: dlen freeWhenDone: YES];
|
||||
data = [data initWithBytesNoCopy: dst length: dlen];
|
||||
string = [[NSString alloc] initWithData: data
|
||||
encoding: NSASCIIStringEncoding];
|
||||
RELEASE(data);
|
||||
|
@ -1070,10 +1070,12 @@ static void MD5Transform (unsigned long buf[4], unsigned long const in[16])
|
|||
- (void) replaceString: (NSString*)replace
|
||||
withString: (NSString*)by
|
||||
{
|
||||
[self replaceOccurrencesOfString: replace
|
||||
withString: by
|
||||
options: 0
|
||||
range: NSMakeRange(0, [self length])];
|
||||
NSRange range = [self rangeOfString: replace];
|
||||
|
||||
while (range.location != NSNotFound) {
|
||||
[self replaceCharactersInRange: range withString: by];
|
||||
range = [self rangeOfString: replace];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue