Explorar o código

Added typedefs for SQInt16, insert a comment on SQHash to remember change it to ptrdiff_t.
Change _constructoridx and _destructoridx to be SQInt16.

mingodad %!s(int64=12) %!d(string=hai) anos
pai
achega
b85b9efa2e
Modificáronse 2 ficheiros con 7 adicións e 5 borrados
  1. 4 2
      SquiLu/include/squirrel.h
  2. 3 3
      SquiLu/squirrel/sqclass.h

+ 4 - 2
SquiLu/include/squirrel.h

@@ -54,10 +54,12 @@ typedef int SQInt32;
 typedef unsigned int SQUnsignedInteger32;
 typedef unsigned int SQUnsignedInteger32;
 #else
 #else
 typedef int SQInteger;
 typedef int SQInteger;
+typedef unsigned int SQUnsignedInteger;
 typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/
 typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/
 typedef unsigned int SQUnsignedInteger32; /*must be 32 bits(also on 64bits processors)*/
 typedef unsigned int SQUnsignedInteger32; /*must be 32 bits(also on 64bits processors)*/
-typedef unsigned int SQUnsignedInteger;
-typedef unsigned int SQHash; /*should be the same size of a pointer*/
+typedef short SQInt16;
+typedef unsigned short SQUnsignedInt16;
+typedef unsigned int /*ptrdiff_t*/ SQHash; /*should be the same size of a pointer*/
 #endif
 #endif
 
 
 
 

+ 3 - 3
SquiLu/squirrel/sqclass.h

@@ -103,10 +103,10 @@ public:
 	SQObjectPtr _attributes;
 	SQObjectPtr _attributes;
 	SQUserPointer _typetag;
 	SQUserPointer _typetag;
 	SQRELEASEHOOK _hook;
 	SQRELEASEHOOK _hook;
-	bool _locked;
-	SQInteger _constructoridx;
-	SQInteger _destructoridx;
+	SQInt16 _constructoridx;
+	SQInt16 _destructoridx;
 	SQInteger _udsize;
 	SQInteger _udsize;
+	bool _locked;
 };
 };
 
 
 #define calcinstancesize(_theclass_) \
 #define calcinstancesize(_theclass_) \