ref: 431e46469c0804f6f01cc4f5c90ab1daac7d3054
parent: 945d0df7de71f059f636a86151529697ed54ec80
author: Jean-Marc Valin <[email protected]>
date: Mon Apr 21 09:54:41 EDT 2008
Making stack push a tiny bit clearer to the compiler -- don't think it really has an effect though.
--- a/libcelt/stack_alloc.h
+++ b/libcelt/stack_alloc.h
@@ -116,7 +116,7 @@
/* FIXME: Only align up to a certain size (not for structs) */
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
-#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/sizeof(char)),(stack)+=((size)*sizeof(type)/sizeof(char)),(type*)((stack)-((size)*sizeof(type)/sizeof(char))))
+#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)/sizeof(char)),(stack)+=(size)*(sizeof(type)/sizeof(char)),(type*)((stack)-(size)*(sizeof(type)/sizeof(char))))
#define RESTORE_STACK (global_stack = _saved_stack)
#endif