aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/KeyWords.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-06-12 13:09:53 +0000
committernyamatongwe <unknown>2002-06-12 13:09:53 +0000
commit1d5751d5b7584fbed2276273486b18d8f7f2261a (patch)
treec49bb5c729cb02bd40f05fe663428fa99c42c1aa /src/KeyWords.cxx
parentb2ee95cb3d2251da8b6751bdb39b34945e045163 (diff)
downloadscintilla-mirror-1d5751d5b7584fbed2276273486b18d8f7f2261a.tar.gz
Patch from Gilles to make non debug targets force linking of lexers.
Diffstat (limited to 'src/KeyWords.cxx')
-rw-r--r--src/KeyWords.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx
index decbac2b8..8a03aa8ac 100644
--- a/src/KeyWords.cxx
+++ b/src/KeyWords.cxx
@@ -129,14 +129,16 @@ int wxForceScintillaLexers(void) {
return Scintilla_LinkLexers();
}
-// Shorten the code that declares a lexer and ensures it is linked in by calling a method.
-#define LINK_LEXER(lexer) extern LexerModule lexer; lexer.GetLanguage();
-
// To add or remove a lexer, add or remove its file and run LexGen.py.
// Force a reference to all of the Scintilla lexers so that the linker will
// not remove the code of the lexers.
int Scintilla_LinkLexers() {
+ static int forcer = 0;
+
+// Shorten the code that declares a lexer and ensures it is linked in by calling a method.
+#define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage();
+
//++Autogenerated -- run src/LexGen.py to regenerate
//**\(\tLINK_LEXER(\*);\n\)
LINK_LEXER(lmAda);