aboutsummaryrefslogtreecommitdiff
path: root/lout/object.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-01-29 18:28:36 +0100
committerSebastian Geerken <devnull@localhost>2013-01-29 18:28:36 +0100
commitff62d018ba1434f9e9d5beb3a2c82fb1c4ed0f85 (patch)
treefa3e74abe72781b63468677ed024f68cf62aff06 /lout/object.cc
parentb8270ee350357ef491fa9ba92cf6250258d3099c (diff)
parentd8f1e1bcfa59947b0dabc7a1ec61232d2eb5535e (diff)
Merge with main repo.
Diffstat (limited to 'lout/object.cc')
-rw-r--r--lout/object.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lout/object.cc b/lout/object.cc
index 843c0ae4..85a908b9 100644
--- a/lout/object.cc
+++ b/lout/object.cc
@@ -21,6 +21,7 @@
#include "object.hh"
#include <stdio.h>
+#include <stdint.h>
#include <config.h>
namespace lout {
@@ -132,7 +133,7 @@ int Pointer::hashValue()
// Combine both parts of the pointer value *itself*, not what it
// points to, by first referencing it (operator "&"), then
// dereferencing it again (operator "[]").
- return ((int*)&value)[0] ^ ((int*)&value)[1];
+ return ((intptr_t)value >> 32) ^ ((intptr_t)value);
#endif
}