summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_variable.c
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2006-05-16 10:01:07 +0000
committerMichal Krol <mjkrol@gmail.org>2006-05-16 10:01:07 +0000
commita67330d157ffe05602a3163c946aa97e29cb6bb5 (patch)
tree887c324eb714adc2f2ba0b7b83cdf138202f5bd9 /src/mesa/shader/slang/slang_compile_variable.c
parentd1b40400d64a8ab7f4dc64410e165e7c49d30a28 (diff)
Cleanup code. Change constructor prototype.
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_variable.c')
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c
index 063709b303..b62743addb 100644
--- a/src/mesa/shader/slang/slang_compile_variable.c
+++ b/src/mesa/shader/slang/slang_compile_variable.c
@@ -120,14 +120,16 @@ int slang_fully_specified_type_copy (slang_fully_specified_type *x, const slang_
return 1;
}
-/* slang_variable_scope */
+/*
+ * slang_variable_scope
+ */
-int slang_variable_scope_construct (slang_variable_scope *scope)
+GLvoid
+_slang_variable_scope_ctr (slang_variable_scope *self)
{
- scope->variables = NULL;
- scope->num_variables = 0;
- scope->outer_scope = NULL;
- return 1;
+ self->variables = NULL;
+ self->num_variables = 0;
+ self->outer_scope = NULL;
}
void slang_variable_scope_destruct (slang_variable_scope *scope)
@@ -145,8 +147,7 @@ int slang_variable_scope_copy (slang_variable_scope *x, const slang_variable_sco
slang_variable_scope z;
unsigned int i;
- if (!slang_variable_scope_construct (&z))
- return 0;
+ _slang_variable_scope_ctr (&z);
z.variables = (slang_variable *) slang_alloc_malloc (y->num_variables * sizeof (slang_variable));
if (z.variables == NULL)
{