aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2001-12-03 17:39:12 +0000
committerKeith Whitwell <[email protected]>2001-12-03 17:39:12 +0000
commit3a825a85f13b86b3a9658aeb7d3793b98fcb48cf (patch)
treeb15d07cd272a5488196cce3e4151ccbbf87b3719 /src
parentbfd2ae6e99535a729d09f110b7c06cf62ad83041 (diff)
avoid side-effects in macro param
Diffstat (limited to 'src')
-rw-r--r--src/mesa/tnl/t_eval_api.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_eval_api.c b/src/mesa/tnl/t_eval_api.c
index 75e73fb9cb7..37d8f69118b 100644
--- a/src/mesa/tnl/t_eval_api.c
+++ b/src/mesa/tnl/t_eval_api.c
@@ -1,4 +1,4 @@
-/* $Id: t_eval_api.c,v 1.7 2001/05/14 09:00:51 keithw Exp $ */
+/* $Id: t_eval_api.c,v 1.8 2001/12/03 17:39:12 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -103,8 +103,9 @@ _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
struct immediate *im = TNL_CURRENT_IM(ctx);
if (compiling) {
+ struct immediate *tmp = _tnl_alloc_immediate( ctx );
FLUSH_VERTICES( ctx, 0 );
- SET_IMMEDIATE( ctx, _tnl_alloc_immediate( ctx ) );
+ SET_IMMEDIATE( ctx, tmp );
TNL_CURRENT_IM(ctx)->ref_count++;
ctx->CompileFlag = GL_FALSE;
}
@@ -161,8 +162,9 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
struct immediate *im = TNL_CURRENT_IM(ctx);
if (compiling) {
+ struct immediate *tmp = _tnl_alloc_immediate( ctx );
FLUSH_VERTICES( ctx, 0 );
- SET_IMMEDIATE( ctx, _tnl_alloc_immediate( ctx ) );
+ SET_IMMEDIATE( ctx, tmp );
TNL_CURRENT_IM(ctx)->ref_count++;
ctx->CompileFlag = GL_FALSE;
}