Initial commit
This commit is contained in:
24
include/lisp/array.h
Normal file
24
include/lisp/array.h
Normal file
@ -0,0 +1,24 @@
|
||||
#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
|
Reference in New Issue
Block a user