Revert "Move private Array methods into main file"

This reverts commit 5c8cb8fec8.

The fix comes next.
This commit is contained in:
Bill Currie 2010-12-12 20:43:28 +09:00
parent 4481ba9b0d
commit c262229478
2 changed files with 0 additions and 36 deletions

View file

@ -1,6 +1,5 @@
#include "Array+Private.h"
#if 0
@implementation Array (Private)
/**
@ -32,4 +31,3 @@
}
@end
#endif

View file

@ -1,7 +1,6 @@
#include "math.h"
#include "Array.h"
#include "Array+Private.h"
#define STANDARD_CAPACITY 16
#define ARRAY_MAX_GRANULARITY 100
@ -371,36 +370,3 @@
}
@end
@implementation Array (Private)
/**
This is a somewhat dangerous thing to do, and it's only done so that we can
use an Array to implement AutoreleasePool.
*/
- (void) addObjectNoRetain: (id)anObject
{
if (count == capacity) {
capacity += granularity;
_objs = (id [])obj_realloc (_objs, capacity * @sizeof (id));
}
_objs[count++] = anObject;
}
- (void) removeObjectNoRelease: (id)anObject
{
local unsigned i = count;
local unsigned tmp;
do {
if (_objs[--i] == anObject) {
for (tmp = i; tmp < count; tmp++) {
_objs[tmp] = _objs[tmp + 1];
}
count--;
}
} while (i);
}
@end