浏览代码

stb_c_lexer: don't define default macro definitions on non-implementation includes

Sean Barrett 4 年之前
父节点
当前提交
ca0e6d06d8
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      stb_c_lexer.h

+ 2 - 0
stb_c_lexer.h

@@ -42,6 +42,7 @@
 //
 //
 //   See end of file for license information.
 //   See end of file for license information.
 
 
+#ifdef STB_C_LEXER_IMPLEMENTATION
 #ifndef STB_C_LEXER_DEFINITIONS
 #ifndef STB_C_LEXER_DEFINITIONS
 // to change the default parsing rules, copy the following lines
 // to change the default parsing rules, copy the following lines
 // into your C/C++ file *before* including this, and then replace
 // into your C/C++ file *before* including this, and then replace
@@ -96,6 +97,7 @@
 #define STB_C_LEXER_DEFINITIONS         // This line prevents the header file from replacing your definitions
 #define STB_C_LEXER_DEFINITIONS         // This line prevents the header file from replacing your definitions
 // --END--
 // --END--
 
 
+#endif
 #endif
 #endif
 
 
 #ifndef INCLUDE_STB_C_LEXER_H
 #ifndef INCLUDE_STB_C_LEXER_H