-#ifndef ARRAYLIST_H
-#define ARRAYLIST_H
+#pragma once
-typedef entity ArrayList;
+USING(ArrayList, entity);
.int al_buf;
.int al_len;
#define AL_NEW(this, n, default, T) \
MACRO_BEGIN \
{ \
- ArrayList _al = this = new(ArrayList); \
- make_pure(_al); \
+ ArrayList _al = this = new_pure(ArrayList); \
_al.al_buf = buf_create(); \
for (int i = 0, _n = _al.al_len = n; i < _n; ++i) \
{ \
MACRO_BEGIN \
{ \
buf_del(this.al_buf); \
- remove(this); \
+ delete(this); \
this = NULL; \
} MACRO_END
if (cond) { body } \
} \
} MACRO_END
-
-#endif