From 66a451129cfc31318e793823c077215d7628e75f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 13 Apr 2012 20:55:14 +0100 Subject: [PATCH] Fix Integer <-> Pointer casts on 64bit --- src/cat/TPTSTypes.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cat/TPTSTypes.cpp b/src/cat/TPTSTypes.cpp index 7b39cc91b..a8fa9626d 100644 --- a/src/cat/TPTSTypes.cpp +++ b/src/cat/TPTSTypes.cpp @@ -7,6 +7,7 @@ #include #include +#include #include "TPTSTypes.h" AnyType::AnyType(ValueType type_, void * value_): @@ -39,7 +40,7 @@ AnyType::operator NumberType() if(type != TypeNumber) throw InvalidConversionException(type, TypeNumber); else - return NumberType((int)value); + return NumberType((intptr_t)value); } AnyType::operator StringType() @@ -88,7 +89,7 @@ NumberType::NumberType(int number): AnyType(TypeNumber, (void*)number) { } int NumberType::Value() { - return (int)value; + return (intptr_t)value; } //String type