// The two following members have been moved after the bitfield to workaround a MSVC 64-bit compiler bug (fixed in VS2013)
// For more info, see: http://connect.microsoft.com/VisualStudio/feedback/details/777184/c-compiler-bug-vtable-pointer-put-at-wrong-offset-in-64-bit-mode
if(!isTable())throwELuaNotATable(NLMISC::toString("Trying to set a function value '%p' at key %s on object '%s' of type %s (not a table).",value,key,getId().c_str(),getTypename()));
if(!isTable())throwELuaNotATable(NLMISC::toString("Trying to set a function value '%p' at key %s on object '%s' of type %s (not a table).",(void*)value,key,getId().c_str(),getTypename()));
uint8*block=(uint8*)aligned_malloc(NL_DEFAULT_MEMORY_ALIGNMENT+size,NL_DEFAULT_MEMORY_ALIGNMENT);//new uint8[size + sizeof(uint)]; // an additionnal uint is needed to store size of block
if(!block)returnNULL;
#ifdef NL_DEBUG
_MemBlockToAllocID[block]=_AllocID;
#endif
*(uint*)block=size;
returnblock+sizeof(uint);
returnblock+NL_DEFAULT_MEMORY_ALIGNMENT;
}
uintentry=((size+(_Granularity-1))/_Granularity);
nlassert(entry<_ObjectSizeToAllocator.size());
if(!_ObjectSizeToAllocator[entry])
{
_ObjectSizeToAllocator[entry]=newCFixedSizeAllocator(entry*_Granularity+sizeof(uint),_MaxAllocSize/size);// an additionnal uint is needed to store size of block
_ObjectSizeToAllocator[entry]=newCFixedSizeAllocator(entry*_Granularity+NL_DEFAULT_MEMORY_ALIGNMENT,_MaxAllocSize/size);// an additionnal uint is needed to store size of block
checkIgnore=CreateWindowW(L"BUTTON",L"Don't display this report again",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX|BS_CHECKBOX,7,290,429,18,dialog,(HMENU)NULL,(HINSTANCE)GetWindowLongPtr(dialog,GWLP_HINSTANCE),NULL);
sendReport=CreateWindowW(L"BUTTON",L"Don't send the report",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,7,315+32,429,18,dialog,(HMENU)NULL,(HINSTANCE)GetWindowLongPtr(dialog,GWLP_HINSTANCE),NULL);