]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
fix a silly macro issue
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index 97f0e4d1774be599c661fe409e18cf1e7522f853..448c0c371faeede86bdf92be61e43e274518394a 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -265,7 +265,7 @@ void _util_vec_grow(void **a, size_t i, size_t s);
 )
 
 /* exposed interface */
-#define vec_meta(A)       (((vector_t*)((void*)A)) - 1)
+#define vec_meta(A)       (((vector_t*)((void*)(A))) - 1)
 #define vec_free(A)       ((void)((A) ? (mem_d((void*)vec_meta(A)), (A) = NULL) : 0))
 #define vec_push(A,V)     (GMQCC_VEC_WILLGROW((A),1), (A)[vec_meta(A)->used++] = (V))
 #define vec_size(A)       ((A) ? vec_meta(A)->used : 0)
@@ -627,6 +627,11 @@ enum {
 /* TODO: elide */
 extern const char *util_instr_str[VINSTR_END];
 
+void util_swap_header     (prog_header_t              *code_header);
+void util_swap_statements (prog_section_statement_t   *statements);
+void util_swap_defs_fields(prog_section_both_t        *section);
+void util_swap_functions  (prog_section_function_t    *functions);
+void util_swap_globals    (int32_t                    *globals);
 
 typedef float    qcfloat_t;
 typedef int32_t  qcint_t;