aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2006-02-13 07:38:05 +0000
committernyamatongwe <devnull@localhost>2006-02-13 07:38:05 +0000
commit0fe8306ffa7c79774286eb2f015ec69372297203 (patch)
tree70a07ca241d309927c0ebefd57ef66fd658ab3ac /src
parent9c0deaed39b7ec5f4139db7027eabe583c4a90a8 (diff)
downloadscintilla-mirror-0fe8306ffa7c79774286eb2f015ec69372297203.tar.gz
Since casting between void* and function pointers produces a warning
under recent g++, add an additional cast to sptr_t. Add small size and pedantic warning flags.
Diffstat (limited to 'src')
-rw-r--r--src/ExternalLexer.cxx10
1 files changed, 6 insertions, 4 deletions
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];