Ticket #15783 (closed optimization: fixed)
Increase maintainability of code in 'stc' module (new approach)
|Reported by:||awi||Owned by:|
In the code in stc.cpp file there are plenty of calls of SendMsg function.
In some of these calls first argument of the function (representing message code) is given as a symbol (defined in Scintilla.h) but in others as a plain numeric value what makes the code more difficult to analyse and to maintain.
Because std.cpp file is generated by script 'src/stc/gen_iface.py' so the script was modified in order to generate symbols of codes (taken from Scintilla.h) instead of numeric values:
- Scintilla.h file is parsed first and dictionary containing (code, symbol) pairs is created (new processHeader function)
- based on this dictionary all message codes are replaced with corresponding symbols when stc.cpp file is generated (in parseFun function)
Patch file attached.