mojoshader.c
branchtrunk
changeset 195 5e68c48dac00
parent 194 8de489efc811
child 214 a4346bb8608b
--- a/mojoshader.c	Fri Apr 25 05:29:36 2008 -0400
+++ b/mojoshader.c	Fri Apr 25 14:37:08 2008 -0400
@@ -4323,9 +4323,15 @@
 } // parse_token
 
 
+// #define this to force app to supply an allocator, so there's no reference
+//  to the C runtime's malloc() and free()...
+#if MOJOSHADER_FORCE_ALLOCATOR
+#define internal_malloc NULL
+#define internal_free NULL
+#else
 static void *internal_malloc(int bytes, void *d) { return malloc(bytes); }
 static void internal_free(void *ptr, void *d) { free(ptr); }
-
+#endif
 
 static int find_profile_id(const char *profile)
 {