#847 some modifications

Feature_Request
closed-fixed
Scintilla (796)
5
2010-01-27
2009-08-26
Anonymous
No

#there are some modifications in my application, hope it useful.

Scintilla 1.7.6/1.7.9/2.01 Modification

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;

Discussion

  • Neil Hodgson

    Neil Hodgson - 2009-08-27

    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.

     
  • Nobody/Anonymous

    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".

     
  • Neil Hodgson

    Neil Hodgson - 2009-08-30

    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.

     
  • Neil Hodgson

    Neil Hodgson - 2009-09-17

    Changed the 3 Scintilla_* function prototypes in Scintilla.h to be extern "C".

     
  • Neil Hodgson

    Neil Hodgson - 2009-09-17
    • milestone: --> Feature_Request
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2010-01-27
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.