equal
deleted
inserted
replaced
88 t_ptr = (T*)realloc(t_ptr, num_elements * sizeof(T)); |
88 t_ptr = (T*)realloc(t_ptr, num_elements * sizeof(T)); |
89 if (t_ptr == NULL) ReallocError(num_elements * sizeof(T)); |
89 if (t_ptr == NULL) ReallocError(num_elements * sizeof(T)); |
90 return t_ptr; |
90 return t_ptr; |
91 } |
91 } |
92 |
92 |
|
93 /** alloca() has to be called in the parent function, so define AllocaM() as a macro */ |
|
94 #define AllocaM(T, num_elements) ((T*)alloca((num_elements) * sizeof(T))) |
|
95 |
93 #endif /* ALLOC_FUNC_HPP */ |
96 #endif /* ALLOC_FUNC_HPP */ |