-/* Code generated from eC source file. */
+/* Code generated from eC source file: instance.ec */
#if defined(__GNUC__)
typedef long long int64;
typedef unsigned long long uint64;
#define structSize_ClassProperty (_64BIT ? 80 : 40)
#define structSize_Method (_64BIT ? 96 : 52)
#define structSize_Property (_64BIT ? 152 : 88)
-#define structSize_Class (_64BIT ? 616 : 372)
+#define structSize_Class (_64BIT ? 624 : 376)
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
struct __ecereNameSpace__ecere__sys__OldList templatized;
int numParams;
unsigned int isInstanceClass;
+unsigned int byValueSystemClass;
} __attribute__ ((gcc_struct));
static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
}
}
+unsigned int __ecereNameSpace__ecere__com__poolingDisabled;
+
static void * __ecereNameSpace__ecere__com___mymalloc(unsigned int size)
{
struct __ecereNameSpace__ecere__com__MemBlock * block = (((void *)0));
if(!__ecereNameSpace__ecere__com__memoryInitialized)
__ecereNameSpace__ecere__com__InitMemory();
-if(p < 31)
+if(!__ecereNameSpace__ecere__com__poolingDisabled && p < 31)
{
block = __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Add(&__ecereNameSpace__ecere__com__pools[p]);
if(block)
extern char * strncpy(char * , const char * , size_t n);
-static void __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(struct __ecereNameSpace__ecere__com__Class * base);
-
extern int printf(char * , ...);
+static void __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(struct __ecereNameSpace__ecere__com__Class * base);
+
static void __ecereNameSpace__ecere__com__NameSpace_Free(struct __ecereNameSpace__ecere__com__NameSpace * parentNameSpace);
static struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereNameSpace__ecere__com__SearchNameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name, void * listOffset);
totalSizeClass = offsetClass + sizeClass;
if((_class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, name)))
{
-__ecereNameSpace__ecere__com__FreeTemplatesDerivatives(_class);
if(!_class->internalDecl)
{
if(declMode != 4)
}
return (((void *)0));
}
+__ecereNameSpace__ecere__com__FreeTemplatesDerivatives(_class);
classLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*_class->nameSpace).classes, name + start);
__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)classLink);
{
_class->offset = (base && base->structSize && base->type != 1000) ? base->structSize : ((type == 5) ? 0 : ((force64Bits && inCompiler && fixed) ? 24 : (force32Bits && inCompiler && fixed) ? 12 : structSize_Instance));
if(crossBits)
{
-if(strstr(name, "ecere::sys::EARHeader") || strstr(name, "AnchorValue") || !strcmp(name, "ecere::com::CustomAVLTree") || !strcmp(name, "ecere::com::Array") || !strcmp(name, "ecere::gui::Window") || !strcmp(name, "ecere::sys::Mutex"))
+if(!strcmp(name, "GNOSISSystem") || !strcmp(name, "LineStyle") || !strcmp(name, "FillStyle") || !strcmp(name, "FontObject") || !strcmp(name, "SymbolStyle"))
+{
+_class->offset = force32Bits ? 24 : 12;
+}
+else if(strstr(name, "ecere::sys::EARHeader") || strstr(name, "AnchorValue") || !strcmp(name, "ecere::com::CustomAVLTree") || !strcmp(name, "ecere::com::Array") || !strcmp(name, "ecere::gui::Window") || !strcmp(name, "ecere::sys::Mutex"))
;
else
{
struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, char * name, char * type, void * function, int declMode)
{
-if(_class && name)
+if(_class && !_class->comRedefinition && name)
{
struct __ecereNameSpace__ecere__com__Class * base;
struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, char * name, char * type, void * function, int declMode)
{
-if(_class && name)
+if(_class && !_class->comRedefinition && name)
{
struct __ecereNameSpace__ecere__com__Class * base;
return (((void *)0));
}
+extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(char * string, char * output);
+
+extern char * __ecereNameSpace__ecere__sys__GetExtension(char * string, char * output);
+
+extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
+
+extern int strcasecmp(const char * , const char * );
+
static struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__Module_Load(struct __ecereNameSpace__ecere__com__Instance * fromModule, char * name, int importAccess, unsigned int ensureCOM)
{
unsigned int (stdcall * Load)(struct __ecereNameSpace__ecere__com__Instance * module) = (((void *)0));
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;
-((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name = __ecereNameSpace__ecere__sys__CopyString(name);
+{
+char moduleName[274];
+char ext[17];
+
+__ecereNameSpace__ecere__sys__GetLastDirectory(name, moduleName);
+__ecereNameSpace__ecere__sys__GetExtension(moduleName, ext);
+__ecereNameSpace__ecere__sys__StripExtension(moduleName);
+if((!(strcasecmp)(ext, "dylib") || !(strcasecmp)(ext, "so")) && strstr(moduleName, "lib") == moduleName)
+{
+int len = strlen(moduleName) - 3;
+
+memmove(moduleName, moduleName + 3, len);
+moduleName[len] = (char)0;
+}
+((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name = __ecereNameSpace__ecere__sys__CopyString(moduleName);
+}
((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->Unload = Unload;
((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->origImportType = 0;
if(!Load(module))
return __ecereNameSpace__ecere__com__activeDesigner;
}
+void __ecereNameSpace__ecere__com__eSystem_SetPoolingDisabled(unsigned int disabled)
+{
+__ecereNameSpace__ecere__com__poolingDisabled = disabled;
+}
+
unsigned int __ecereNameSpace__ecere__sys__UTF8Validate(char * source)
{
unsigned int ch = ((unsigned char *)source)[c];
+switch(ch)
+{
+case 150:
+ch = 0x2012;
+break;
+}
if(ch < 0x80)
{
if(d + 1 >= max)
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "templatized", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "numParams", "int", 4, 4, 1);
__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isInstanceClass", "bool", 4, 4, 1);
+__ecereNameSpace__ecere__com__eClass_AddDataMember(class, "byValueSystemClass", "bool", 4, 4, 1);
if(class)
class->fixed = (unsigned int)1;
if(class)
__ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "CreateNew", "void ::CreateNew(EditBox editBox, Size clientSize, char * name, char * inherit)", 0, 1);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::SetActiveDesigner", "void ecere::com::SetActiveDesigner(ecere::com::DesignerBase designer)", __ecereNameSpace__ecere__com__SetActiveDesigner, module, 4);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::GetActiveDesigner", "ecere::com::DesignerBase ecere::com::GetActiveDesigner(void)", __ecereNameSpace__ecere__com__GetActiveDesigner, module, 4);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_SetPoolingDisabled", "void ecere::com::eSystem_SetPoolingDisabled(bool disabled)", __ecereNameSpace__ecere__com__eSystem_SetPoolingDisabled, module, 4);
__ecereNameSpace__ecere__com__eSystem_RegisterDefine("ecere::sys::LEAD_OFFSET", "0xD800 - (0x10000 >> 10)", module, 2);
__ecereNameSpace__ecere__com__eSystem_RegisterDefine("ecere::sys::SURROGATE_OFFSET", "0x10000 - (0xD800 << 10) - 0xDC00", module, 2);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF8Validate", "bool ecere::sys::UTF8Validate(char * source)", __ecereNameSpace__ecere__sys__UTF8Validate, module, 4);