branch | NewGRF_ports |
changeset 10994 | cd9968b6f96b |
parent 10274 | b3c58f3df92b |
--- a/src/core/alloc_func.hpp Tue Jun 17 10:32:49 2008 +0000 +++ b/src/core/alloc_func.hpp Tue Jun 17 13:22:13 2008 +0000 @@ -90,4 +90,7 @@ return t_ptr; } +/** alloca() has to be called in the parent function, so define AllocaM() as a macro */ +#define AllocaM(T, num_elements) ((T*)alloca((num_elements) * sizeof(T))) + #endif /* ALLOC_FUNC_HPP */