summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-02-19 11:58:49 -0500
committerKristian Høgsberg <krh@bitplanet.net>2010-02-19 12:03:01 -0500
commit32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (patch)
tree5c44742f6d4f8711b6d1ca31d68d3245abd0187a /src/mesa/shader/program_parse.y
parent6bf1ea897fa470af58fe8916dff45e2da79634a3 (diff)
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
Diffstat (limited to 'src/mesa/shader/program_parse.y')
-rw-r--r--src/mesa/shader/program_parse.y22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 577bd2c38d..299e2477e4 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -1056,7 +1056,7 @@ ccMaskRule: IDENTIFIER
? err_str : "invalid condition code");
if (err_str != NULL) {
- _mesa_free(err_str);
+ free(err_str);
}
YYERROR;
@@ -1079,7 +1079,7 @@ ccMaskRule2: USED_IDENTIFIER
? err_str : "invalid condition code");
if (err_str != NULL) {
- _mesa_free(err_str);
+ free(err_str);
}
YYERROR;
@@ -1956,7 +1956,7 @@ optVarSize: string
? err_str : "invalid storage size specifier");
if (err_str != NULL) {
- _mesa_free(err_str);
+ free(err_str);
}
YYERROR;
@@ -2442,7 +2442,7 @@ int add_state_reference(struct gl_program_parameter_list *param_list,
param_list->StateFlags |= _mesa_program_state_flags(tokens);
/* free name string here since we duplicated it in add_parameter() */
- _mesa_free(name);
+ free(name);
return index;
}
@@ -2607,7 +2607,7 @@ make_error_string(const char *fmt, ...)
*/
length = 1 + vsnprintf(NULL, 0, fmt, args);
- str = _mesa_malloc(length);
+ str = malloc(length);
if (str) {
vsnprintf(str, length, fmt, args);
}
@@ -2627,7 +2627,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s)
err_str = make_error_string("glProgramStringARB(%s)\n", s);
if (err_str) {
_mesa_error(state->ctx, GL_INVALID_OPERATION, err_str);
- _mesa_free(err_str);
+ free(err_str);
}
err_str = make_error_string("line %u, char %u: error: %s\n",
@@ -2635,7 +2635,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s)
_mesa_set_program_error(state->ctx, locp->position, err_str);
if (err_str) {
- _mesa_free(err_str);
+ free(err_str);
}
}
@@ -2657,7 +2657,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
/* Make a copy of the program string and force it to be NUL-terminated.
*/
- strz = (GLubyte *) _mesa_malloc(len + 1);
+ strz = (GLubyte *) malloc(len + 1);
if (strz == NULL) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB");
return GL_FALSE;
@@ -2745,7 +2745,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
error:
for (inst = state->inst_head; inst != NULL; inst = temp) {
temp = inst->next;
- _mesa_free(inst);
+ free(inst);
}
state->inst_head = NULL;
@@ -2754,8 +2754,8 @@ error:
for (sym = state->sym; sym != NULL; sym = temp) {
temp = sym->next;
- _mesa_free((void *) sym->name);
- _mesa_free(sym);
+ free((void *) sym->name);
+ free(sym);
}
state->sym = NULL;