]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Handling some operands, added type_name array
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index e5d37af936063b7d5601c93791dc959c35119dd5..59c8f47a0b298447662d0f6fc6b9b13a002a8992 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -283,6 +283,8 @@ enum {
     TYPE_COUNT
 };
 
+extern const char *type_name[TYPE_COUNT];
+
 extern size_t type_sizeof[TYPE_COUNT];
 extern uint16_t type_store_instr[TYPE_COUNT];
 /* could use type_store_instr + INSTR_STOREP_F - INSTR_STORE_F
@@ -717,6 +719,16 @@ void Tself##_##mem##_clear(Tself *self) \
     (owner)->mem##_alloc = 0;       \
 }
 
+#define MEM_VECTOR_MOVE(from, mem, to, tm)   \
+{                                            \
+    (to)->tm = (from)->mem;                  \
+    (to)->tm##_count = (from)->mem##_count;  \
+    (to)->tm##_alloc = (from)->mem##_alloc;  \
+    (from)->mem = NULL;                      \
+    (from)->mem##_count = 0;                 \
+    (from)->mem##_alloc = 0;                 \
+}
+
 #define MEM_VEC_FUNCTIONS(Tself, Twhat, mem) \
 _MEM_VEC_FUN_REMOVE(Tself, Twhat, mem)       \
 _MEM_VEC_FUN_ADD(Tself, Twhat, mem)