diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2022-01-18 22:56:54 +0000 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2022-01-18 22:56:54 +0000 |
commit | 98378138a521fa52758f1ed3501900e6c323c474 (patch) | |
tree | 2671a6cc1ba80d9790995b33205536c4184f55b2 /src/con_.h | |
parent | e388efa5eba02ce6909193f700f11fe1385230e9 (diff) |
Very slightly tidy RTTI stuff
More handwavey Linux prep, nothing too significant.
Diffstat (limited to 'src/con_.h')
-rw-r--r-- | src/con_.h | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -211,10 +211,19 @@ extern int con_cmdclient; // internal detail, used by DEF_* macros below extern void *_con_vtab_cmd[]; -// msvc rtti tables are offset negatively from the vtable pointer. to make this -// a constant expression we have to use a macro -#define _con_vtab_var (_con_realvtab_var + 1) -extern void *_con_realvtab_var[]; +// rtti pointers are offset negatively from the vtable pointer. to make this +// a constant expression we have to use a macro. +extern struct _con_vtab_var_wrap { +#ifdef _WIN32 + struct msvc_rtti_locator *rtti; +#else + // itanium ABI also has the top offset/"whole object" offset in libstdc++ + ssize topoffset; + struct itanium_type_info *rtti; +#endif + void *vtable[19]; +} _con_vtab_var_wrap; +#define _con_vtab_var (_con_vtab_var_wrap.vtable) extern void *_con_vtab_iconvar[]; #define _DEF_CVAR(name_, desc, value, hasmin_, min, hasmax_, max, flags_) \ |