mojoshader_compiler.c
changeset 859 824d67791db0
parent 858 d51537335896
child 868 8e2034c3f175
equal deleted inserted replaced
858:d51537335896 859:824d67791db0
   585     (void) ctx;
   585     (void) ctx;
   586     printf("%s:%u: %s\n", ctx->sourcefile, ctx->sourceline, str);
   586     printf("%s:%u: %s\n", ctx->sourcefile, ctx->sourceline, str);
   587 } // fail
   587 } // fail
   588 
   588 
   589 
   589 
   590 static void usertypemap_nuke(const void *k, const void *v) { /* no-op. */ }
   590 static void usertypemap_nuke(const void *k, const void *v, void *d) {/*no-op*/}
   591 
   591 
   592 static int create_usertypemap(Context *ctx)
   592 static int create_usertypemap(Context *ctx)
   593 {
   593 {
   594     UserTypeMap *map = &ctx->usertypes;
   594     UserTypeMap *map = &ctx->usertypes;
   595 
   595 
   596     map->scope = NULL;
   596     map->scope = NULL;
   597     map->types = hash_create(255, hash_hash_string, hash_keymatch_string,
   597     map->types = hash_create(ctx, hash_hash_string, hash_keymatch_string,
   598                              usertypemap_nuke, 1, ctx->malloc, ctx->free,
   598                              usertypemap_nuke, 1, ctx->malloc, ctx->free,
   599                              ctx->malloc_data);
   599                              ctx->malloc_data);
   600     if (!map->types)
   600     if (!map->types)
   601     {
   601     {
   602         out_of_memory(ctx);
   602         out_of_memory(ctx);