mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Array tidyup/optimisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8509 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d2ac6b1b5b
commit
0ab12ac694
8 changed files with 450 additions and 324 deletions
|
@ -35,11 +35,11 @@
|
|||
#include <Foundation/NSNotificationQueue.h>
|
||||
#include <Foundation/NSObjCRuntime.h>
|
||||
|
||||
#include <base/NSGArray.h>
|
||||
|
||||
@class NSGDictionary;
|
||||
@class NSGMutableDictionary;
|
||||
@class NSDataMalloc;
|
||||
@class GSInlineArray;
|
||||
@class GSMutableArray;
|
||||
@class GSCString;
|
||||
@class GSUnicodeString;
|
||||
@class GSMutableString;
|
||||
|
@ -86,14 +86,6 @@ static char st_dict = (char)ST_DICT;
|
|||
static char st_mdict = (char)ST_MDICT;
|
||||
static char st_data = (char)ST_DATA;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSGArray)
|
||||
} NSGArrayStruct;
|
||||
|
||||
typedef struct {
|
||||
@defs(NSGMutableArray)
|
||||
} NSGMutableArrayStruct;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@ -522,7 +514,8 @@ deserializeFromInfo(_NSDeserializerInfo* info)
|
|||
}
|
||||
else
|
||||
{
|
||||
a = NSAllocateObject(IACls, 0, NSDefaultMallocZone());
|
||||
a = NSAllocateObject(IACls, sizeof(id)*size,
|
||||
NSDefaultMallocZone());
|
||||
a = (*iaInitImp)(a, iaInitSel, objects, size);
|
||||
}
|
||||
#if !GS_WITH_GC
|
||||
|
@ -694,8 +687,8 @@ deserializeFromInfo(_NSDeserializerInfo* info)
|
|||
maInitSel = @selector(initWithObjects:count:);
|
||||
idInitSel = @selector(initWithObjects:forKeys:count:);
|
||||
mdInitSel = @selector(initWithObjects:forKeys:count:);
|
||||
IACls = [NSGArray class];
|
||||
MACls = [NSGMutableArray class];
|
||||
IACls = [GSInlineArray class];
|
||||
MACls = [GSMutableArray class];
|
||||
DCls = [NSDataMalloc class];
|
||||
IDCls = [NSGDictionary class];
|
||||
MDCls = [NSGMutableDictionary class];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue