diff options
author | Neil <nyamatongwe@gmail.com> | 2020-05-11 19:58:23 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-05-11 19:58:23 +1000 |
commit | a2360c37c6374007ba2d6ce937862ce357485fec (patch) | |
tree | 6849d7f87400707830e96e397c50a820ba55f41c /lexilla/src/Lexilla.cxx | |
parent | 933c417dd7fa2e4cdc83f0a8b84c3d2d17889b32 (diff) | |
download | scintilla-mirror-a2360c37c6374007ba2d6ce937862ce357485fec.tar.gz |
Set calling convention to stdcall to match clients and old DLL lexers and
export names undecorated.
Diffstat (limited to 'lexilla/src/Lexilla.cxx')
-rw-r--r-- | lexilla/src/Lexilla.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lexilla/src/Lexilla.cxx b/lexilla/src/Lexilla.cxx index 2cc1ed7c9..cff38fa01 100644 --- a/lexilla/src/Lexilla.cxx +++ b/lexilla/src/Lexilla.cxx @@ -12,8 +12,10 @@ #if _WIN32 #define EXPORT_FUNCTION __declspec(dllexport) +#define CALLING_CONVENTION __stdcall #else #define EXPORT_FUNCTION __attribute__((visibility("default"))) +#define CALLING_CONVENTION #endif #include "ILexer.h" @@ -305,12 +307,12 @@ void AddEachLexer() { extern "C" { -int EXPORT_FUNCTION GetLexerCount() { +EXPORT_FUNCTION int CALLING_CONVENTION GetLexerCount() { AddEachLexer(); return catalogueLexilla.Count(); } -void EXPORT_FUNCTION GetLexerName(unsigned int index, char *name, int buflength) { +EXPORT_FUNCTION void CALLING_CONVENTION GetLexerName(unsigned int index, char *name, int buflength) { AddEachLexer(); *name = 0; const char *lexerName = catalogueLexilla.Name(index); @@ -319,12 +321,12 @@ void EXPORT_FUNCTION GetLexerName(unsigned int index, char *name, int buflength) } } -LexerFactoryFunction EXPORT_FUNCTION GetLexerFactory(unsigned int index) { +EXPORT_FUNCTION LexerFactoryFunction CALLING_CONVENTION GetLexerFactory(unsigned int index) { AddEachLexer(); return catalogueLexilla.Factory(index); } -ILexer5 EXPORT_FUNCTION *CreateLexer(const char *name) { +EXPORT_FUNCTION ILexer5 * CALLING_CONVENTION CreateLexer(const char *name) { AddEachLexer(); for (unsigned int i = 0; i < catalogueLexilla.Count(); i++) { const char *lexerName = catalogueLexilla.Name(i); |