summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vp_build.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-12-06 15:41:43 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-12-06 15:41:43 +0000
commit9580179dfb42d5b81ff6ec9704b82a556c7f1229 (patch)
treeae2a55aa82c4efc43ae832abcf316e1773c228bb /src/mesa/tnl/t_vp_build.c
parentd5179613d5302173471a6a910fa9ec235c9ff046 (diff)
C++ fixes, mostly casts (Stephane Conversy)
Diffstat (limited to 'src/mesa/tnl/t_vp_build.c')
-rw-r--r--src/mesa/tnl/t_vp_build.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index 77e105115c..7e28bbbc3c 100644
--- a/src/mesa/tnl/t_vp_build.c
+++ b/src/mesa/tnl/t_vp_build.c
@@ -514,7 +514,7 @@ static void emit_op3fn(struct tnl_program *p,
return;
}
- inst->Opcode = op;
+ inst->Opcode = (enum prog_opcode) op;
inst->StringPos = 0;
inst->Data = 0;
@@ -1406,7 +1406,7 @@ create_new_program( const struct state_key *key,
p.temp_reserved = ~((1<<max_temps)-1);
p.program->Base.Instructions
- = MALLOC(sizeof(struct prog_instruction) * MAX_INSN);
+ = (struct prog_instruction*) MALLOC(sizeof(struct prog_instruction) * MAX_INSN);
p.program->Base.String = 0;
p.program->Base.NumInstructions =
p.program->Base.NumTemporaries =
@@ -1441,7 +1441,7 @@ static void rehash( struct tnl_cache *cache )
GLuint size, i;
size = cache->size * 3;
- items = MALLOC(size * sizeof(*items));
+ items = (struct tnl_cache_item**) _mesa_malloc(size * sizeof(*items));
_mesa_memset(items, 0, size * sizeof(*items));
for (i = 0; i < cache->size; i++)
@@ -1461,7 +1461,7 @@ static void cache_item( struct tnl_cache *cache,
void *key,
void *data )
{
- struct tnl_cache_item *c = MALLOC(sizeof(*c));
+ struct tnl_cache_item *c = (struct tnl_cache_item*) _mesa_malloc(sizeof(*c));
c->hash = hash;
c->key = key;
c->data = data;