From: Jerome St-Louis Date: Mon, 3 Feb 2014 21:48:48 +0000 (+0700) Subject: ecere/com/instance: Fixes to cross-compile from 64 bit gnosis on Android X-Git-Tag: 0.44.09.9~127 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e8a06d23df8a057480cce01d7069df448de6844;p=sdk ecere/com/instance: Fixes to cross-compile from 64 bit gnosis on Android --- diff --git a/ecere/src/com/instance.ec b/ecere/src/com/instance.ec index cd9f651..b7df135 100644 --- a/ecere/src/com/instance.ec +++ b/ecere/src/com/instance.ec @@ -2622,8 +2622,19 @@ public dllexport Class eSystem_RegisterClass(ClassType type, char * name, char * // For cross-bitness-compiling if(crossBits) { + // The GNOSIS runtime will use 'offset' to point to the object during compile executation + // Need to rethink through our cross-bitness compiling to have a distinct 'offset' (e.g. runtimeOffset) + // used by the runtime library vs. 'offset' used by the compiler to hardcode compilation results (or avoid those altogether) + if(!strcmp(name, "GNOSISSystem") || + !strcmp(name, "LineStyle") || + !strcmp(name, "FillStyle") || + !strcmp(name, "FontObject") || + !strcmp(name, "SymbolStyle")) + { + _class.offset = force32Bits ? 24 : 12; + } // Ideally, the running library should be aware of the struct size of both 32 and 64 bit, since the compiler has no knowledge whatsoever of private members - if(strstr(name, "ecere::sys::EARHeader") || + else if(strstr(name, "ecere::sys::EARHeader") || strstr(name, "AnchorValue") || !strcmp(name, "ecere::com::CustomAVLTree") || !strcmp(name, "ecere::com::Array") || @@ -2739,6 +2750,7 @@ public dllexport Class eSystem_RegisterClass(ClassType type, char * name, char * } FixDerivativesBase(_class, _class); + return _class; } }