Convert everything from the talloc API to the ralloc API.

This commit is contained in:
Kenneth Graunke
2011-01-21 14:32:31 -08:00
parent dc55254f5b
commit d3073f58c1
67 changed files with 590 additions and 604 deletions

View File

@@ -54,7 +54,7 @@ load_text_fd (void *ctx, int fd)
while (1) {
if (total_read + CHUNK + 1 > text_size) {
text_size = text_size ? text_size * 2 : CHUNK + 1;
text = talloc_realloc_size (ctx, text, text_size);
text = reralloc_size (ctx, text, text_size);
if (text == NULL) {
fprintf (stderr, "Out of memory\n");
return NULL;
@@ -64,7 +64,7 @@ load_text_fd (void *ctx, int fd)
if (bytes < 0) {
fprintf (stderr, "Error while reading: %s\n",
strerror (errno));
talloc_free (text);
ralloc_free (text);
return NULL;
}
@@ -107,8 +107,8 @@ int
main (int argc, char *argv[])
{
char *filename = NULL;
void *ctx = talloc(NULL, void*);
char *info_log = talloc_strdup(ctx, "");
void *ctx = ralloc(NULL, void*);
char *info_log = ralloc_strdup(ctx, "");
const char *shader;
int ret;
@@ -125,7 +125,7 @@ main (int argc, char *argv[])
printf("%s", shader);
fprintf(stderr, "%s", info_log);
talloc_free(ctx);
ralloc_free(ctx);
return ret;
}