Don't reference built-in include functions if we preprocessed them out.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 24 Feb 2010 21:23:58 -0500
changeset 867 f5f491d2b82b
parent 866 3fc643a4f742
child 868 8e2034c3f175
Don't reference built-in include functions if we preprocessed them out.
mojoshader_preprocessor.c
--- a/mojoshader_preprocessor.c	Wed Feb 24 21:21:54 2010 -0500
+++ b/mojoshader_preprocessor.c	Wed Feb 24 21:23:58 2010 -0500
@@ -2102,8 +2102,11 @@
 
     if (!m) m = MOJOSHADER_internal_malloc;
     if (!f) f = MOJOSHADER_internal_free;
+
+#if !MOJOSHADER_FORCE_INCLUDE_CALLBACKS
     if (!include_open) include_open = MOJOSHADER_internal_include_open;
     if (!include_close) include_close = MOJOSHADER_internal_include_close;
+#endif
 
     Preprocessor *pp = preprocessor_start(filename, source, sourcelen,
                                           include_open, include_close,