summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/cso_cache/cso_cache.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-25 16:39:39 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-25 16:39:39 +0900
commit2a0675eb75b8ca52efab739218bf93922bf884b5 (patch)
tree38c1c7c6b99f5583e002225d8dc5e7c8a69defec /src/gallium/auxiliary/cso_cache/cso_cache.c
parentb75706764b4cf18f3b41bf4a97d82b3c528064d8 (diff)
Replace standand library functions by portable ones.
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_cache.c')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.c b/src/gallium/auxiliary/cso_cache/cso_cache.c
index 776ce6bacf..9c32e94124 100644
--- a/src/gallium/auxiliary/cso_cache/cso_cache.c
+++ b/src/gallium/auxiliary/cso_cache/cso_cache.c
@@ -28,6 +28,8 @@
/* Authors: Zack Rusin <zack@tungstengraphics.com>
*/
+#include "pipe/p_util.h"
+
#include "cso_cache.h"
#include "cso_hash.h"
@@ -176,7 +178,7 @@ void * cso_take_state(struct cso_cache *sc,
struct cso_cache *cso_cache_create(void)
{
- struct cso_cache *sc = malloc(sizeof(struct cso_cache));
+ struct cso_cache *sc = MALLOC_STRUCT(cso_cache);
sc->blend_hash = cso_hash_create();
sc->sampler_hash = cso_hash_create();
@@ -197,5 +199,5 @@ void cso_cache_delete(struct cso_cache *sc)
cso_hash_delete(sc->rasterizer_hash);
cso_hash_delete(sc->fs_hash);
cso_hash_delete(sc->vs_hash);
- free(sc);
+ FREE(sc);
}