quakeforge/ruamoko/scheme/Frame.r
Bill Currie 75ec6bf244 Clean out some unnecessary types from the progs engine and clean up the mess.
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00

48 lines
743 B
R

#include "Frame.h"
@implementation Frame
+ (id) newWithSize: (integer) sz link: (Frame []) l
{
return [[self alloc] initWithSize: sz link: l];
}
- (id) initWithSize: (integer) sz link: (Frame []) l
{
self = [super init];
size = sz;
link = l;
array = obj_malloc(@sizeof (id) * size);
return self;
}
- (void) set: (integer) index to: (SchemeObject []) o
{
array[index] = o;
}
- (SchemeObject []) get: (integer) index
{
return array[index];
}
- (Frame []) getLink
{
return link;
}
- (void) markReachable
{
local integer index;
for (index = 0; index < size; index++) {
[array[index] mark];
}
[link mark];
}
- (void) dealloc
{
obj_free(array);
[super dealloc];
}
@end