From 7411a84c2bd6f4dd4f027c6c6a647822cbb4c061 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 25 Jan 2008 19:33:58 +0900 Subject: gallium: Define MALLOC_STRUCT. --- src/mesa/pipe/p_util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/pipe/p_util.h b/src/mesa/pipe/p_util.h index a2bc330424..059528787d 100644 --- a/src/mesa/pipe/p_util.h +++ b/src/mesa/pipe/p_util.h @@ -108,6 +108,8 @@ REALLOC( void *old_ptr, unsigned old_size, unsigned new_size ) #endif /* WIN32 */ +#define MALLOC_STRUCT(T) (struct T *) MALLOC(sizeof(struct T)) + #define CALLOC_STRUCT(T) (struct T *) CALLOC(1, sizeof(struct T)) -- cgit v1.2.3