summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaders.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-02-19 11:58:49 -0500
committerKristian Høgsberg <[email protected]>2010-02-19 12:03:01 -0500
commit32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (patch)
tree5c44742f6d4f8711b6d1ca31d68d3245abd0187a /src/mesa/main/shaders.c
parent6bf1ea897fa470af58fe8916dff45e2da79634a3 (diff)
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
Diffstat (limited to 'src/mesa/main/shaders.c')
-rw-r--r--src/mesa/main/shaders.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 91f2a7a7bf4..e6f6add7688 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -434,7 +434,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
* This array holds offsets of where the appropriate string ends, thus the
* last element will be set to the total length of the source code.
*/
- offsets = (GLint *) _mesa_malloc(count * sizeof(GLint));
+ offsets = (GLint *) malloc(count * sizeof(GLint));
if (offsets == NULL) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
return;
@@ -442,7 +442,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
for (i = 0; i < count; i++) {
if (string[i] == NULL) {
- _mesa_free((GLvoid *) offsets);
+ free((GLvoid *) offsets);
_mesa_error(ctx, GL_INVALID_OPERATION, "glShaderSourceARB(null string)");
return;
}
@@ -460,9 +460,9 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
* valgrind warnings in the parser/grammer code.
*/
totalLength = offsets[count - 1] + 2;
- source = (GLcharARB *) _mesa_malloc(totalLength * sizeof(GLcharARB));
+ source = (GLcharARB *) malloc(totalLength * sizeof(GLcharARB));
if (source == NULL) {
- _mesa_free((GLvoid *) offsets);
+ free((GLvoid *) offsets);
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB");
return;
}
@@ -491,7 +491,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
if (newSource) {
_mesa_fprintf(stderr, "Mesa: Replacing shader %u chksum=%d with %s\n",
shaderObj, checksum, filename);
- _mesa_free(source);
+ free(source);
source = newSource;
}
}
@@ -504,7 +504,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
sh->SourceChecksum = checksum; /* save original checksum */
}
- _mesa_free(offsets);
+ free(offsets);
}