Minor performance improvements.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3209 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1998-11-12 10:58:17 +00:00
parent 7e2d21836f
commit acaae6854e
5 changed files with 217 additions and 117 deletions

View file

@ -33,7 +33,6 @@
#include <gnustep/base/preface.h>
#include <Foundation/NSString.h>
#include <Foundation/NSGString.h>
#include <Foundation/NSData.h>
#include <Foundation/NSCoder.h>
#include <gnustep/base/IndexedCollection.h>
#include <gnustep/base/IndexedCollectionPrivate.h>
@ -224,13 +223,11 @@
- (const char *) cString
{
char *r;
char *r = (char*)_fastMallocBuffer(_count+1);
OBJC_MALLOC(r, char, _count+1);
if (_count > 0)
ustrtostr(r,_contents_chars, _count);
r[_count] = '\0';
[NSData dataWithBytesNoCopy: r length: _count+1];
return r;
}