{
}
-static int __ecereNameSpace__ecere__com__insideCrossBuild32;
-
static void __ecereNameSpace__ecere__com__ComputeClassParameters(struct __ecereNameSpace__ecere__com__Class * templatedClass, char * templateParams, struct __ecereNameSpace__ecere__com__Instance * findModule);
extern char * strchr(const char * , int);
{
{
int size = _class->structSize;
+int flags = (unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)_class->module + structSize_Instance)))->application + structSize_Module)))->isGUIApp;
+unsigned int inCompiler = (flags & 8) ? 0x1 : 0x0;
+unsigned int force32Bits = (flags & 4) ? 0x1 : 0x0;
-if(__ecereNameSpace__ecere__com__insideCrossBuild32)
+if(force32Bits && inCompiler)
{
if(!strcmp(_class->name, "Module"))
size = 560;
unsigned int (stdcall * Load)(struct __ecereNameSpace__ecere__com__Instance * module) = (((void *)0));
unsigned int (stdcall * Unload)(struct __ecereNameSpace__ecere__com__Instance * module) = (((void *)0));
struct __ecereNameSpace__ecere__com__Instance * module;
-int flags = (unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->isGUIApp;
-unsigned int inCompiler = (flags & 8) ? 0x1 : 0x0;
-unsigned int force32Bits = (flags & 4) ? 0x1 : 0x0;
-unsigned int setInsideCrossBuild32 = force32Bits && inCompiler;
for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
{
}
if(Load)
{
-if(setInsideCrossBuild32)
-__ecereNameSpace__ecere__com__insideCrossBuild32++;
module = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com__eInstance_New(__ecereNameSpace__ecere__com__eSystem_FindClass(fromModule, "Module"));
((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application;
((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->library = library;
__ecereNameSpace__ecere__com__eInstance_Delete((struct __ecereNameSpace__ecere__com__Instance *)module);
module = (((void *)0));
}
-if(setInsideCrossBuild32)
-__ecereNameSpace__ecere__com__insideCrossBuild32--;
}
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules, module);
}
{
Load = __ecereDll_Load_ecere;
Unload = __ecereDll_Unload_ecere;
-if(setInsideCrossBuild32)
-__ecereNameSpace__ecere__com__insideCrossBuild32++;
module = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com__eInstance_New(__ecereNameSpace__ecere__com__eSystem_FindClass(fromModule, "Module"));
((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application;
((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->library = (((void *)0));
__ecereNameSpace__ecere__com__eInstance_Delete((struct __ecereNameSpace__ecere__com__Instance *)module);
module = (((void *)0));
}
-if(setInsideCrossBuild32)
-__ecereNameSpace__ecere__com__insideCrossBuild32--;
__ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules, module);
}
if(module)
{
if(instance && _property && _property->isWatchable)
{
-if(!__ecereNameSpace__ecere__com__insideCrossBuild32)
+struct __ecereNameSpace__ecere__com__Instance * module = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class ? ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->module : (((void *)0));
+struct __ecereNameSpace__ecere__com__Instance * application = module ? ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application : (((void *)0));
+int flags = application ? (unsigned int)((struct __ecereNameSpace__ecere__com__Application *)(((char *)application + structSize_Module)))->isGUIApp : 0;
+unsigned int inCompiler = (flags & 8) ? 0x1 : 0x0;
+unsigned int force32Bits = (flags & 4) ? 0x1 : 0x0;
+
+if(!force32Bits || !inCompiler)
{
struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + _property->watcherOffset);
struct __ecereNameSpace__ecere__com__Watcher * watcher, * next;
#endif
}
-static int insideCrossBuild32;
-
static void FixDerivativesBase(Class base, Class mod)
{
OldLink derivative;
#endif
{
int size = _class.structSize;
- if(insideCrossBuild32)
+ int flags = _class.module.application.isGUIApp;
+ bool inCompiler = (flags & 8) ? true : false;
+ bool force32Bits = (flags & 4) ? true : false;
+ if(force32Bits && inCompiler)
{
// Allocate 64 bit sizes for these when cross-compiling for 32 bit to allow loaded libraries to work properly
if(!strcmp(_class.name, "Module"))
bool (stdcall * Load)(Module module) = null;
bool (stdcall * Unload)(Module module) = null;
Module module;
- int flags = fromModule.application.isGUIApp;
- bool inCompiler = (flags & 8) ? true : false;
- bool force32Bits = (flags & 4) ? true : false;
- bool setInsideCrossBuild32 = force32Bits && inCompiler;
for(module = fromModule.application.allModules.first; module; module = module.next)
{
}
if(Load)
{
- if(setInsideCrossBuild32)
- insideCrossBuild32++;
-
module = (Module)eInstance_New(eSystem_FindClass(fromModule, "Module"));
module.application = fromModule.application;
module.library = library;
eInstance_Delete((Instance)module);
module = null;
}
-
- if(setInsideCrossBuild32)
- insideCrossBuild32--;
}
fromModule.application.allModules.Add(module);
}
Load = COM_LOAD_FUNCTION;
Unload = COM_UNLOAD_FUNCTION;
- if(setInsideCrossBuild32)
- insideCrossBuild32++;
-
module = (Module)eInstance_New(eSystem_FindClass(fromModule, "Module"));
module.application = fromModule.application;
module.library = null;
module = null;
}
- if(setInsideCrossBuild32)
- insideCrossBuild32--;
fromModule.application.allModules.Add(module);
}
if(module)
{
if(instance && _property && _property.isWatchable)
{
- if(!insideCrossBuild32)
+ Module module = instance._class ? instance._class.module : null;
+ Application application = module ? module.application : null;
+ int flags = application ? application.isGUIApp : 0;
+ bool inCompiler = (flags & 8) ? true : false;
+ bool force32Bits = (flags & 4) ? true : false;
+ if(!force32Bits || !inCompiler)
{
OldList * watchers = (OldList *)((byte *)instance + _property.watcherOffset);
Watcher watcher, next;