From: José Fonseca Date: Fri, 25 Jan 2008 10:33:58 +0000 (+0900) Subject: gallium: Define MALLOC_STRUCT. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7411a84c2bd6f4dd4f027c6c6a647822cbb4c061;p=mesa.git gallium: Define MALLOC_STRUCT. --- diff --git a/src/mesa/pipe/p_util.h b/src/mesa/pipe/p_util.h index a2bc330424d..059528787d6 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))