04-23-2005, 09:46 PM
It worked when you added the extra-fields because an UDT assignament will call memcpy() and the 2 dummy fields allocated more space on stack, "moving" the function pointer fields down enough to not be overwritten.
"this" has to be changed to ptr or you will get an invalid data type, callocate() returns a pointer -- btw, "this" or "self" will probably be reserved later when classes are added.
As explained before, FB had to follow GCC 3.x ABI, that's quite complex, returning structs on registers when possible, it won't be simple to add, only prototypes are allowed atm, mainly to support the GSL library.
"this" has to be changed to ptr or you will get an invalid data type, callocate() returns a pointer -- btw, "this" or "self" will probably be reserved later when classes are added.
As explained before, FB had to follow GCC 3.x ABI, that's quite complex, returning structs on registers when possible, it won't be simple to add, only prototypes are allowed atm, mainly to support the GSL library.
ew FreeBASIC forums: http://www.freebasic.net/forum/index.php