mirror of
https://github.com/albertodemichelis/squirrel.git
synced 2026-01-11 14:08:41 +01:00
checks for max member count for classes
This commit is contained in:
@ -61,6 +61,9 @@ bool SQClass::NewSlot(SQSharedState *ss,const SQObjectPtr &key,const SQObjectPtr
|
||||
_defaultvalues[_member_idx(temp)].val = val;
|
||||
return true;
|
||||
}
|
||||
if (_members->CountUsed() >= MEMBER_MAX_COUNT) {
|
||||
return false;
|
||||
}
|
||||
if(belongs_to_static_table) {
|
||||
SQInteger mmidx;
|
||||
if((sq_type(val) == OT_CLOSURE || sq_type(val) == OT_NATIVECLOSURE) &&
|
||||
|
||||
@ -17,6 +17,7 @@ typedef sqvector<SQClassMember> SQClassMemberVec;
|
||||
|
||||
#define MEMBER_TYPE_METHOD 0x01000000
|
||||
#define MEMBER_TYPE_FIELD 0x02000000
|
||||
#define MEMBER_MAX_COUNT 0x00FFFFFF
|
||||
|
||||
#define _ismethod(o) (_integer(o)&MEMBER_TYPE_METHOD)
|
||||
#define _isfield(o) (_integer(o)&MEMBER_TYPE_FIELD)
|
||||
|
||||
Reference in New Issue
Block a user