fix for squirrel on 64 bit
authorMatthias Braun <matze@braunis.de>
Thu, 5 May 2005 12:59:23 +0000 (12:59 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 5 May 2005 12:59:23 +0000 (12:59 +0000)
SVN-Revision: 2404

src/squirrel/squirrel/sqclass.cpp
src/squirrel/squirrel/sqclass.h

index 11d4095..997a94e 100644 (file)
@@ -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);
index 5c12d7e..c9de102 100644 (file)
@@ -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<SQClassMemeber> SQClassMemeberVec;
+typedef sqvector<SQClassMember> 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;