diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-03-18 20:47:29 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-03-18 20:47:29 +0100 |
commit | efdea080a27d51b522f2414873e5c112201b71e6 (patch) | |
tree | 1f1d9a12230dd356fd7e2bde17200e8abdf1d3b3 /src/symbols.h | |
parent | 79112159f8f87efb5aa6fc98def89f4cd50545e8 (diff) | |
download | sciteco-efdea080a27d51b522f2414873e5c112201b71e6.tar.gz |
declare all global inter-dependant objects in main.cpp and get rid of init_priority attribute
* we cannot use weak symbols in MinGW, so we avoid init_priority for symbol
initialization by compiling the empty definitions into
sciteco-minimal but the real ones into sciteco
(had to add new file symbols-minimal.cpp)
* this fixes compilation/linking on LLVM Clang AND Dragonegg
since their init_priority attribute is broken!
this will likely be fixed in the near future but broken versions
will be around for some time
Diffstat (limited to 'src/symbols.h')
-rw-r--r-- | src/symbols.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/symbols.h b/src/symbols.h index 1e94e98..f2cbc16 100644 --- a/src/symbols.h +++ b/src/symbols.h @@ -22,11 +22,13 @@ #include <glib.h> class SymbolList { +public: struct Entry { const gchar *name; gint value; }; +private: const Entry *entries; gint size; int (*cmp_fnc)(const char *, const char *, size_t); @@ -50,12 +52,9 @@ public: gint lookup(const gchar *name, const gchar *prefix = ""); GList *get_glist(void); - - /* generated per Scintilla SymbolList */ - friend class SymbolListInitializer_scintilla; - friend class SymbolListInitializer_scilexer; }; +/* objects declared in symbols-minimal.cpp or auto-generated code */ namespace Symbols { extern SymbolList scintilla; extern SymbolList scilexer; |