Don't include malloc()/free() references if using MOJOSHADER_FORCE_ALLOCATOR.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 13 Feb 2009 09:22:20 -0500
changeset 610 166cdcc4414a
parent 609 cfc937829b35
child 611 8c2ee1a97ee1
Don't include malloc()/free() references if using MOJOSHADER_FORCE_ALLOCATOR.
mojoshader.c
--- a/mojoshader.c	Fri Feb 13 09:17:46 2009 -0500
+++ b/mojoshader.c	Fri Feb 13 09:22:20 2009 -0500
@@ -237,8 +237,10 @@
 
 
 // Convenience functions for allocators...
+#if !MOJOSHADER_FORCE_ALLOCATOR
 void *MOJOSHADER_internal_malloc(int bytes, void *d) { return malloc(bytes); }
 void MOJOSHADER_internal_free(void *ptr, void *d) { free(ptr); }
+#endif
 
 MOJOSHADER_error MOJOSHADER_out_of_mem_error = { "Out of memory", NULL, -1 };
 MOJOSHADER_parseData MOJOSHADER_out_of_mem_data = {