44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
From 76fc2055249da7b03148a7d4197a279e9943f012 Mon Sep 17 00:00:00 2001
|
|
From: martell <martellmalone@gmail.com>
|
|
Date: Mon, 8 Dec 2014 18:11:37 +0000
|
|
Subject: [PATCH] use size_t for void pointer cast
|
|
|
|
---
|
|
include/cling/Interpreter/Value.h | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/include/cling/Interpreter/Value.h b/include/cling/Interpreter/Value.h
|
|
index 4ebc32a..22b28fd 100644
|
|
--- a/include/cling/Interpreter/Value.h
|
|
+++ b/include/cling/Interpreter/Value.h
|
|
@@ -10,6 +10,8 @@
|
|
#ifndef CLING_VALUE_H
|
|
#define CLING_VALUE_H
|
|
|
|
+#include <stddef.h>
|
|
+
|
|
namespace llvm {
|
|
class raw_ostream;
|
|
}
|
|
@@ -101,7 +103,7 @@ namespace cling {
|
|
case kLongDoubleType:
|
|
return (T) V.getAs<long double>();
|
|
case kPointerType:
|
|
- return (T) (unsigned long) V.getAs<void*>();
|
|
+ return (T) (size_t) V.getAs<void*>();
|
|
case kUnsupportedType:
|
|
V.AssertOnUnsupportedTypeCast();
|
|
}
|
|
@@ -115,7 +117,7 @@ namespace cling {
|
|
EStorageType storageType = V.getStorageType();
|
|
switch (storageType) {
|
|
case kPointerType:
|
|
- return (T*) (unsigned long) V.getAs<void*>();
|
|
+ return (T*) (size_t) V.getAs<void*>();
|
|
default:
|
|
V.AssertOnUnsupportedTypeCast(); break;
|
|
}
|
|
--
|
|
2.3.0
|
|
|