mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Changes from Jeremy Bettis. See ChangeLog Jan 21 17:09:09
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2290 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a5b4b7b405
commit
1b0b2e5f30
4 changed files with 45 additions and 3 deletions
|
@ -222,6 +222,19 @@ stringDecrementCountAndFillHoleAt(NSGMutableCStringStruct *self,
|
|||
_contents_chars[_count] = '\0';
|
||||
}
|
||||
|
||||
- (void) appendString: (NSString*)aString
|
||||
{
|
||||
unsigned c = [aString cStringLength];
|
||||
if (_count + c >= _capacity)
|
||||
{
|
||||
_capacity = MAX(_capacity*2, _count+c);
|
||||
OBJC_REALLOC(_contents_chars, char, _capacity);
|
||||
}
|
||||
memcpy(_contents_chars + _count, [aString cStringNoCopy], c);
|
||||
_count += c;
|
||||
_contents_chars[_count] = '\0';
|
||||
}
|
||||
|
||||
/* xxx This method may be removed in future. */
|
||||
- (void) setCString: (const char *)byteString length: (unsigned)length
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue