diff options
| -rw-r--r-- | gtk/makefile | 2 | ||||
| -rw-r--r-- | src/ExternalLexer.cxx | 10 | 
2 files changed, 7 insertions, 5 deletions
| diff --git a/gtk/makefile b/gtk/makefile index 487f19508..2da293582 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -23,7 +23,7 @@ vpath %.h ../src ../include  vpath %.cxx ../src  INCLUDEDIRS=-I ../include -I ../src -CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -DGTK -DSCI_LEXER $(INCLUDEDIRS) +CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -Os -DGTK -DSCI_LEXER $(INCLUDEDIRS)  ifdef NOTHREADS  THREADFLAGS=-DG_THREADS_IMPL_NONE diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx index 752118b77..acf45bc2d 100644 --- a/src/ExternalLexer.cxx +++ b/src/ExternalLexer.cxx @@ -12,6 +12,8 @@  #include "Platform.h" +#include "Scintilla.h" +  #include "SciLexer.h"  #include "PropSet.h"  #include "Accessor.h" @@ -116,16 +118,16 @@ LexerLibrary::LexerLibrary(const char* ModuleName) {  	if (lib->IsValid()) {  		m_sModuleName = ModuleName;  		//Cannot use reinterpret_cast because: ANSI C++ forbids casting between pointers to functions and objects -		GetLexerCountFn GetLexerCount = (GetLexerCountFn)lib->FindFunction("GetLexerCount"); +		GetLexerCountFn GetLexerCount = (GetLexerCountFn)(sptr_t)lib->FindFunction("GetLexerCount");  		if (GetLexerCount) {  			ExternalLexerModule *lex;  			LexerMinder *lm;  			// Find functions in the DLL -			GetLexerNameFn GetLexerName = (GetLexerNameFn)lib->FindFunction("GetLexerName"); -			ExtLexerFunction Lexer = (ExtLexerFunction)lib->FindFunction("Lex"); -			ExtFoldFunction Folder = (ExtFoldFunction)lib->FindFunction("Fold"); +			GetLexerNameFn GetLexerName = (GetLexerNameFn)(sptr_t)lib->FindFunction("GetLexerName"); +			ExtLexerFunction Lexer = (ExtLexerFunction)(sptr_t)lib->FindFunction("Lex"); +			ExtFoldFunction Folder = (ExtFoldFunction)(sptr_t)lib->FindFunction("Fold");  			// Assign a buffer for the lexer name.  			char lexname[100]; | 
