mojoshader_common.c
changeset 1146 31337471b909
parent 1141 77468a2a9165
child 1150 02c0f0afb39a
equal deleted inserted replaced
1145:07f69ab909ec 1146:31337471b909
     1 #define __MOJOSHADER_INTERNAL__ 1
     1 #define __MOJOSHADER_INTERNAL__ 1
     2 #include "mojoshader_internal.h"
     2 #include "mojoshader_internal.h"
       
     3 
       
     4 // Convenience functions for allocators...
       
     5 #if !MOJOSHADER_FORCE_ALLOCATOR
       
     6 void *MOJOSHADER_internal_malloc(int bytes, void *d) { return malloc(bytes); }
       
     7 void MOJOSHADER_internal_free(void *ptr, void *d) { free(ptr); }
       
     8 #endif
       
     9 
       
    10 MOJOSHADER_error MOJOSHADER_out_of_mem_error = {
       
    11     "Out of memory", NULL, MOJOSHADER_POSITION_NONE
       
    12 };
       
    13 
       
    14 MOJOSHADER_parseData MOJOSHADER_out_of_mem_data = {
       
    15     1, &MOJOSHADER_out_of_mem_error, 0, 0, 0, 0,
       
    16     MOJOSHADER_TYPE_UNKNOWN, 0, 0, 0, 0
       
    17 };
       
    18 
     3 
    19 
     4 typedef struct HashItem
    20 typedef struct HashItem
     5 {
    21 {
     6     const void *key;
    22     const void *key;
     7     const void *value;
    23     const void *value;