浏览代码

* Added intptr/uintptr to cbasetypes.h (integers with the same size as a pointer).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12632 54d463be-8e91-2dee-dedb-b68131a5f0ec
FlavioJS 17 年之前
父节点
当前提交
cbbf504bca
共有 2 个文件被更改,包括 13 次插入0 次删除
  1. 1 0
      Changelog-Trunk.txt
  2. 12 0
      src/common/cbasetypes.h

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2008/04/21
+	* Added intptr/uintptr to cbasetypes.h (integers with the same size as a pointer). [FlavioJS]
 	* Rev. 12631 Changed Sacrifice status to end on caster's death, not at 25% HP. [L0ne_W0lf]
 	- Should also fix over-flow damage returning to sacrificed targets. Partially fixes bugreport:1332
 	* Updated sql files to latest [Toms]

+ 12 - 0
src/common/cbasetypes.h

@@ -189,6 +189,18 @@ typedef unsigned long long	uint64;
 #endif
 
 
+//////////////////////////////////////////////////////////////////////////
+// pointer sized integers
+//////////////////////////////////////////////////////////////////////////
+#ifdef __64BIT__
+typedef uint64 uintptr;
+typedef int64 intptr;
+#else
+typedef uint32 uintptr;
+typedef int32 intptr;
+#endif
+
+
 //////////////////////////////////////////////////////////////////////////
 // some redefine of function redefines for some Compilers
 //////////////////////////////////////////////////////////////////////////