diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 968b816..86c6da5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,6 +47,26 @@ #define INI_FILE "teco.ini" #endif +/* + * defining the global objects here ensures + * a ctor/dtor order without depending on the + * GCC init_priority() attribute + */ +#ifdef INTERFACE_GTK +InterfaceGtk interface; +#elif defined(INTERFACE_NCURSES) +InterfaceNCurses interface; +#endif + +/* + * Scintilla will be initialized after these + * ctors (in main()), but dtors are guaranteed + * to be executed before Scintilla's + * destruction + */ +QRegisterTable QRegisters::globals; +Ring ring; + namespace Flags { tecoInt ed = 0; } |