20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#import "OFMacros.h"
static size_t lastpagebyte = 0;
@implementation OFArray
+ newWithItemSize: (size_t)is
{
return [[OFArray alloc] initWithItemSize: is];
}
- initWithItemSize: (size_t)is
{
if ((self = [super init])) {
data = NULL;
itemsize = is;
|
|
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#import "OFMacros.h"
static size_t lastpagebyte = 0;
@implementation OFArray
+ newWithItemSize: (size_t)is
{
return [[self alloc] initWithItemSize: is];
}
- initWithItemSize: (size_t)is
{
if ((self = [super init])) {
data = NULL;
itemsize = is;
|
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
items -= nitems;
return self;
}
@end
@implementation OFBigArray
+ newWithItemSize: (size_t)is
{
return [[OFBigArray alloc] initWithItemSize: is];
}
- initWithItemSize: (size_t)is
{
if (lastpagebyte == 0)
lastpagebyte = getpagesize() - 1;
if ((self = [super initWithItemSize: is]))
size = 0;
|
<
<
<
<
<
|
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
items -= nitems;
return self;
}
@end
@implementation OFBigArray
- initWithItemSize: (size_t)is
{
if (lastpagebyte == 0)
lastpagebyte = getpagesize() - 1;
if ((self = [super initWithItemSize: is]))
size = 0;
|