Use FREE and MALLOC instead of free and malloc.
authorMichal Krol <michal@tungstengraphics.com>
Sun, 28 Oct 2007 16:36:07 +0000 (16:36 +0000)
committerMichal Krol <michal@tungstengraphics.com>
Sun, 28 Oct 2007 17:34:36 +0000 (17:34 +0000)
src/mesa/pipe/p_util.h
src/mesa/pipe/softpipe/sp_context.c
src/mesa/pipe/softpipe/sp_quad_fs.c

index 319bb79..4f68f5e 100644 (file)
@@ -32,6 +32,8 @@
 
 #define CALLOC_STRUCT(T)   (struct T *) calloc(1, sizeof(struct T))
 
+#define MALLOC( SIZE )  malloc( SIZE )
+
 #define FREE( PTR )  free( PTR )
 
 #define CLAMP( X, MIN, MAX )  ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
index 22493f4..3a1861c 100644 (file)
@@ -227,7 +227,7 @@ static void softpipe_destroy( struct pipe_context *pipe )
    softpipe->quad.colormask->destroy( softpipe->quad.colormask );
    softpipe->quad.output->destroy( softpipe->quad.output );
 
-   free( softpipe );
+   FREE( softpipe );
 }
 
 
index 81e405d..c4f90e5 100644 (file)
@@ -212,8 +212,8 @@ struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe )
    uint i;
 
    /* allocate storage for program inputs/outputs, aligned to 16 bytes */
-   qss->inputs = malloc(PIPE_ATTRIB_MAX * sizeof(*qss->inputs) + 16);
-   qss->outputs = malloc(PIPE_ATTRIB_MAX * sizeof(*qss->outputs) + 16);
+   qss->inputs = MALLOC(PIPE_ATTRIB_MAX * sizeof(*qss->inputs) + 16);
+   qss->outputs = MALLOC(PIPE_ATTRIB_MAX * sizeof(*qss->outputs) + 16);
    qss->machine.Inputs = align16(qss->inputs);
    qss->machine.Outputs = align16(qss->outputs);