#there are some modifications in my application, hope it useful.
1. scintilla.h:
- line: 20
add: #define SCI_LEXER
- line 22:
add: |
#ifdef __cplusplus
extern "C" {
#endif
- line 855:
added: |
#ifdef __cplusplus
}
#endif
=============================
Debug modification
=============================
1. Decoration.cxx:
- line: 61
add: |
if( decoNew ==0)
return 0;
SCI_LEXER decides between including or excluding lexers and should remain a compile-time option so that applications may decide whether to include lexers for size and security vulnerability avoidance concerns.
The extern "C" does not look right since the Scintilla_LinkLexers function is actually C++.
Scintilla must now be compiled with exception handling turned on so allocation failures throw std::bad_alloc and no longer return NULL.
thank you for your comment.
1. extern "C" is for static library invoking in c language.
2. i thank that the return type of functions Scintilla_RegisterClasses and Scintilla_ReleaseResources had better changes to int from bool for c language.
3. yes. SCI_LEXER is optional declare.
4. thank you for "Scintilla must now be compiled with exception handling turned on".
bool has been included in the C language since C99. If it is not already visible, you may need to include stdbool.h. Some older compilers may not be C99 compliant.
Changed the 3 Scintilla_* function prototypes in Scintilla.h to be extern "C".