mojoshader.c
changeset 1146 31337471b909
parent 1144 8ca4b4f3ef22
child 1148 3a061cc281c2
equal deleted inserted replaced
1145:07f69ab909ec 1146:31337471b909
   268     varname_function get_varname;
   268     varname_function get_varname;
   269     const_array_varname_function get_const_array_varname;
   269     const_array_varname_function get_const_array_varname;
   270 } Profile;
   270 } Profile;
   271 
   271 
   272 
   272 
   273 // Convenience functions for allocators...
       
   274 #if !MOJOSHADER_FORCE_ALLOCATOR
       
   275 void *MOJOSHADER_internal_malloc(int bytes, void *d) { return malloc(bytes); }
       
   276 void MOJOSHADER_internal_free(void *ptr, void *d) { free(ptr); }
       
   277 #endif
       
   278 
       
   279 MOJOSHADER_error MOJOSHADER_out_of_mem_error = {
       
   280     "Out of memory", NULL, MOJOSHADER_POSITION_NONE
       
   281 };
       
   282 
       
   283 MOJOSHADER_parseData MOJOSHADER_out_of_mem_data = {
       
   284     1, &MOJOSHADER_out_of_mem_error, 0, 0, 0, 0,
       
   285     MOJOSHADER_TYPE_UNKNOWN, 0, 0, 0, 0
       
   286 };
       
   287 
       
   288 
       
   289 // !!! FIXME: cut and paste between every damned source file follows...
   273 // !!! FIXME: cut and paste between every damned source file follows...
   290 // !!! FIXME: We need to make some sort of ContextBase that applies to all
   274 // !!! FIXME: We need to make some sort of ContextBase that applies to all
   291 // !!! FIXME:  files and move this stuff to mojoshader_common.c ...
   275 // !!! FIXME:  files and move this stuff to mojoshader_common.c ...
   292 
   276 
   293 static inline void out_of_memory(Context *ctx)
   277 static inline void out_of_memory(Context *ctx)