aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/map.goc
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/map.goc')
-rw-r--r--libgo/runtime/map.goc11
1 files changed, 6 insertions, 5 deletions
diff --git a/libgo/runtime/map.goc b/libgo/runtime/map.goc
index d6308cb..e19bc96 100644
--- a/libgo/runtime/map.goc
+++ b/libgo/runtime/map.goc
@@ -9,17 +9,18 @@ package runtime
typedef unsigned char byte;
typedef _Bool bool;
-typedef struct __go_map hmap;
+typedef struct __go_map_type MapType;
+typedef struct __go_map Hmap;
typedef struct __go_hash_iter hiter;
/* Access a value in a map, returning a value and a presence indicator. */
-func mapaccess2(h *hmap, key *byte, val *byte) (present bool) {
+func mapaccess2(t *MapType, h *Hmap, key *byte, val *byte) (present bool) {
byte *mapval;
size_t valsize;
mapval = __go_map_index(h, key, 0);
- valsize = h->__descriptor->__map_descriptor->__val_type->__size;
+ valsize = t->__val_type->__size;
if (mapval == nil) {
__builtin_memset(val, 0, valsize);
present = 0;
@@ -31,7 +32,7 @@ func mapaccess2(h *hmap, key *byte, val *byte) (present bool) {
/* Optionally assign a value to a map (m[k] = v, p). */
-func mapassign2(h *hmap, key *byte, val *byte, p bool) {
+func mapassign2(h *Hmap, key *byte, val *byte, p bool) {
if (!p) {
__go_map_delete(h, key);
} else {
@@ -46,7 +47,7 @@ func mapassign2(h *hmap, key *byte, val *byte, p bool) {
/* Initialize a range over a map. */
-func mapiterinit(h *hmap, it *hiter) {
+func mapiterinit(h *Hmap, it *hiter) {
__go_mapiterinit(h, it);
}