Skip to content
Permalink
Browse files
Patched to compile.
  • Loading branch information
icculus committed Apr 8, 2009
1 parent a6d2ae0 commit e8e921086851845fff8c6c097e00363046415b6d
Showing with 4 additions and 4 deletions.
  1. +4 −4 mojoshader_common.c
@@ -66,16 +66,16 @@ HashTable *hash_create(const uint32 initial_table_size,
MOJOSHADER_malloc m, MOJOSHADER_free f, void *d)
{
const uint32 alloc_len = sizeof (HashItem *) * initial_table_size;
HashTable *table = (HashTable *) m(sizeof (HashTable));
HashTable *table = (HashTable *) m(sizeof (HashTable), d);
if (table == NULL)
return 0;
return NULL;
memset(table, '\0', sizeof (HashTable));

table->table = (HashItem **) m(alloc_len, d);
if (table->table == NULL)
{
f(table, d);
return 0;
return NULL;
} // if

memset(table->table, '\0', alloc_len);
@@ -87,7 +87,7 @@ HashTable *hash_create(const uint32 initial_table_size,
table->malloc = m;
table->free = f;
table->malloc_data = d;
return 1;
return table;
} // hash_create

void hash_destroy(HashTable *table)

0 comments on commit e8e9210

Please sign in to comment.