mojoshader.c
changeset 610 166cdcc4414a
parent 558 314c86ff14dd
child 758 f25ef1cca5e2
equal deleted inserted replaced
609:cfc937829b35 610:166cdcc4414a
   235     int glsl_generated_lit_opcode;
   235     int glsl_generated_lit_opcode;
   236 };
   236 };
   237 
   237 
   238 
   238 
   239 // Convenience functions for allocators...
   239 // Convenience functions for allocators...
       
   240 #if !MOJOSHADER_FORCE_ALLOCATOR
   240 void *MOJOSHADER_internal_malloc(int bytes, void *d) { return malloc(bytes); }
   241 void *MOJOSHADER_internal_malloc(int bytes, void *d) { return malloc(bytes); }
   241 void MOJOSHADER_internal_free(void *ptr, void *d) { free(ptr); }
   242 void MOJOSHADER_internal_free(void *ptr, void *d) { free(ptr); }
       
   243 #endif
   242 
   244 
   243 MOJOSHADER_error MOJOSHADER_out_of_mem_error = { "Out of memory", NULL, -1 };
   245 MOJOSHADER_error MOJOSHADER_out_of_mem_error = { "Out of memory", NULL, -1 };
   244 MOJOSHADER_parseData MOJOSHADER_out_of_mem_data = {
   246 MOJOSHADER_parseData MOJOSHADER_out_of_mem_data = {
   245     1, &MOJOSHADER_out_of_mem_error, 0, 0, 0, 0,
   247     1, &MOJOSHADER_out_of_mem_error, 0, 0, 0, 0,
   246     MOJOSHADER_TYPE_UNKNOWN, 0, 0, 0, 0
   248     MOJOSHADER_TYPE_UNKNOWN, 0, 0, 0, 0