From: Matthias Braun Date: Thu, 5 May 2005 12:59:23 +0000 (+0000) Subject: fix for squirrel on 64 bit X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=bc9122aa59e02b3f990bd966083c5b0849d475d4;p=supertux.git fix for squirrel on 64 bit SVN-Revision: 2404 --- diff --git a/src/squirrel/squirrel/sqclass.cpp b/src/squirrel/squirrel/sqclass.cpp index 11d40950a..997a94e0e 100644 --- a/src/squirrel/squirrel/sqclass.cpp +++ b/src/squirrel/squirrel/sqclass.cpp @@ -60,7 +60,7 @@ bool SQClass::NewSlot(const SQObjectPtr &key,const SQObjectPtr &val) } else { if(type(temp) == OT_NULL) { - SQClassMemeber m; + SQClassMember m; m.val = val; _members->NewSlot(key,SQObjectPtr((SQUserPointer)_methods.size())); _methods.push_back(m); @@ -71,7 +71,7 @@ bool SQClass::NewSlot(const SQObjectPtr &key,const SQObjectPtr &val) } return true; } - SQClassMemeber m; + SQClassMember m; m.val = val; _members->NewSlot(key,SQObjectPtr((SQInteger)_defaultvalues.size())); _defaultvalues.push_back(m); diff --git a/src/squirrel/squirrel/sqclass.h b/src/squirrel/squirrel/sqclass.h index 5c12d7e21..c9de10261 100644 --- a/src/squirrel/squirrel/sqclass.h +++ b/src/squirrel/squirrel/sqclass.h @@ -4,9 +4,9 @@ struct SQInstance; -struct SQClassMemeber { - SQClassMemeber(){} - SQClassMemeber(const SQClassMemeber &o) { +struct SQClassMember { + SQClassMember(){} + SQClassMember(const SQClassMember &o) { val = o.val; attrs = o.attrs; } @@ -14,7 +14,7 @@ struct SQClassMemeber { SQObjectPtr attrs; }; -typedef sqvector SQClassMemeberVec; +typedef sqvector SQClassMemberVec; struct SQClass : public CHAINABLE_OBJ { @@ -29,7 +29,7 @@ public: bool NewSlot(const SQObjectPtr &key,const SQObjectPtr &val); bool Get(const SQObjectPtr &key,SQObjectPtr &val) { if(_members->Get(key,val)) { - val = (type(val) == OT_INTEGER?_defaultvalues[_integer(val)].val:_methods[(int)_userpointer(val)].val); + val = (type(val) == OT_INTEGER?_defaultvalues[_integer(val)].val:_methods[_integer(val)].val); return true; } return false; @@ -45,8 +45,8 @@ public: SQTable *_members; //SQTable *_properties; SQClass *_base; - SQClassMemeberVec _defaultvalues; - SQClassMemeberVec _methods; + SQClassMemberVec _defaultvalues; + SQClassMemberVec _methods; SQObjectPtrVec _metamethods; SQObjectPtr _attributes; unsigned int _typetag; @@ -73,7 +73,7 @@ public: ~SQInstance(); bool Get(const SQObjectPtr &key,SQObjectPtr &val) { if(_class->_members->Get(key,val)) { - val = (type(val) == OT_INTEGER?_values[_integer(val)]:_class->_methods[(int)_userpointer(val)].val); + val = (type(val) == OT_INTEGER?_values[_integer(val)]:_class->_methods[_integer(val)].val); return true; } return false;