mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Merge 0.6.6 branch into main.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7187 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a6a395487a
commit
7b0f402b1c
71 changed files with 4888 additions and 5571 deletions
|
@ -110,6 +110,8 @@ static SEL appendSel = @selector(appendBytes:length:);
|
|||
static Class dataStatic;
|
||||
static Class dataMalloc;
|
||||
static Class mutableDataMalloc;
|
||||
static Class NSDataAbstract;
|
||||
static Class NSMutableDataAbstract;
|
||||
static IMP appendImp;
|
||||
|
||||
static BOOL
|
||||
|
@ -326,6 +328,8 @@ failure:
|
|||
{
|
||||
if (self == [NSData class])
|
||||
{
|
||||
NSDataAbstract = self;
|
||||
NSMutableDataAbstract = [NSMutableData class];
|
||||
dataMalloc = [NSDataMalloc class];
|
||||
dataStatic = [NSDataStatic class];
|
||||
mutableDataMalloc = [NSMutableDataMalloc class];
|
||||
|
@ -335,7 +339,14 @@ failure:
|
|||
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
return (NSData*)NSAllocateObject(dataMalloc, 0, z);
|
||||
if (self == NSDataAbstract)
|
||||
{
|
||||
return NSAllocateObject(dataMalloc, 0, z);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSAllocateObject(self, 0, z);
|
||||
}
|
||||
}
|
||||
|
||||
+ (id) data
|
||||
|
@ -1269,7 +1280,14 @@ failure:
|
|||
@implementation NSMutableData
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
return (NSData*)NSAllocateObject(mutableDataMalloc, 0, z);
|
||||
if (self == NSMutableDataAbstract)
|
||||
{
|
||||
return NSAllocateObject(mutableDataMalloc, 0, z);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSAllocateObject(self, 0, z);
|
||||
}
|
||||
}
|
||||
|
||||
+ (id) data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue