projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cbff50
)
gallium: Define MALLOC_STRUCT.
author
José Fonseca
<jrfonseca@tungstengraphics.com>
Fri, 25 Jan 2008 10:33:58 +0000
(19:33 +0900)
committer
José Fonseca
<jrfonseca@tungstengraphics.com>
Sat, 26 Jan 2008 01:35:09 +0000
(10:35 +0900)
src/mesa/pipe/p_util.h
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/p_util.h
b/src/mesa/pipe/p_util.h
index a2bc330424d9d07a379eb99d7837695d7c6904a7..059528787d623a0e50df98e4af5e22fe9896c5f0 100644
(file)
--- 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))