25 lines
425 B
C
25 lines
425 B
C
#ifndef INCLUDED_ARRAY_H
|
|
#define INCLUDED_ARRAY_H
|
|
|
|
#include "lisp/object.h"
|
|
#include "lisp/util.h"
|
|
|
|
LISP_BEGIN_DECLS
|
|
|
|
DECLARE_CLASS(Array);
|
|
|
|
struct Array {
|
|
Object base;
|
|
size_t length;
|
|
void *value;
|
|
};
|
|
struct ArrayClass {
|
|
Class base;
|
|
Object *(*length)(Object *self);
|
|
Object *(*elt)(Object *self, Object *index);
|
|
Object *(*aset)(Object *self, Object *index, Object *value);
|
|
};
|
|
|
|
LISP_END_DECLS
|
|
#endif
|