aboutsummaryrefslogtreecommitdiff
path: root/core/_preload.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-11-02 22:34:09 +0000
committergingerBill <bill@gingerbill.org>2017-11-02 22:34:09 +0000
commitfcc8b89e6b8f2df503ff19abbca67f8cbddf11dc (patch)
tree88b0b02b6c2878ae285847ab0173ffdede5a25eb /core/_preload.odin
parent529d1c78c73a50e33c3953d45258395a136cd7f4 (diff)
Fix issue #130; allow conversion from any pointer to `uintptr` and vice versa
Diffstat (limited to 'core/_preload.odin')
-rw-r--r--core/_preload.odin10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/_preload.odin b/core/_preload.odin
index 325e5ed9e..7cc2f07e0 100644
--- a/core/_preload.odin
+++ b/core/_preload.odin
@@ -438,10 +438,10 @@ __get_map_header :: proc "contextless" (m: ^$T/map[$K]$V) -> __Map_Header {
_, is_string := type_info_base(type_info_of(K)).variant.(Type_Info_String);
header.is_key_string = is_string;
- header.entry_size = size_of(Entry);
- header.entry_align = align_of(Entry);
- header.value_offset = offset_of(Entry, value);
- header.value_size = size_of(V);
+ header.entry_size = int(size_of(Entry));
+ header.entry_align = int(align_of(Entry));
+ header.value_offset = int(offset_of(Entry, value));
+ header.value_size = int(size_of(V));
return header;
}
@@ -461,7 +461,7 @@ __get_map_key :: proc "contextless" (key: $K) -> __Map_Key {
case Type_Info_Rune:
map_key.hash = u128((cast(^rune)&key)^);
case Type_Info_Pointer:
- map_key.hash = u128(uint((^rawptr)(&key)^));
+ map_key.hash = u128(uintptr((^rawptr)(&key)^));
case Type_Info_Float:
switch 8*size_of(key) {
case 32: map_key.hash = u128((^u32)(&key)^);