mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
7e2d21836f
commit
acaae6854e
5 changed files with 217 additions and 117 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue