projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16b68b1
)
glsl2: Make function names and variable names be children of the node.
author
Eric Anholt
<eric@anholt.net>
Wed, 30 Jun 2010 18:51:54 +0000
(11:51 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 30 Jun 2010 18:52:40 +0000
(11:52 -0700)
This avoids losing their memory when the parser state is freed.
src/glsl/ir.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ir.cpp
b/src/glsl/ir.cpp
index 4eb0e9e33ebb8d2b096b73aa88894f2ab95c77a9..60ee36d17cb9a09345e71469e936c550ce075ef5 100644
(file)
--- a/
src/glsl/ir.cpp
+++ b/
src/glsl/ir.cpp
@@
-733,7
+733,7
@@
ir_variable::ir_variable(const struct glsl_type *type, const char *name)
mode(ir_var_auto), interpolation(ir_var_smooth), array_lvalue(false)
{
this->type = type;
- this->name =
name
;
+ this->name =
talloc_strdup(this, name)
;
this->location = -1;
this->warn_extension = NULL;
this->constant_value = NULL;
@@
-820,9
+820,8
@@
ir_function_signature::replace_parameters(exec_list *new_params)
ir_function::ir_function(const char *name)
- : name(name)
{
- /* empty */
+ this->name = talloc_strdup(this, name);
}