]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Local variable parsing
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index e5d37af936063b7d5601c93791dc959c35119dd5..56c0ba4d0a09d13ea2cf1e364611ae041b36bb2a 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -717,6 +717,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)