aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_map.h
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-06-27 14:41:12 +0200
committerAnthony Ramine <[email protected]>2014-08-20 12:29:36 +0200
commit631474e50fd84fd526dd1a5db4753b3d27ebb8e7 (patch)
tree18c0dbade65632e06392cd172abc21841698a695 /erts/emulator/beam/erl_map.h
parent1b9383a8dbc03473860dfaacc7a02fbc8b1b1185 (diff)
downloadotp-631474e50fd84fd526dd1a5db4753b3d27ebb8e7.tar.gz
otp-631474e50fd84fd526dd1a5db4753b3d27ebb8e7.tar.bz2
otp-631474e50fd84fd526dd1a5db4753b3d27ebb8e7.zip
Return pointer to value in erts_maps_get()
While at it, implement erts_maps_get_rel() for halfword support.
Diffstat (limited to 'erts/emulator/beam/erl_map.h')
-rw-r--r--erts/emulator/beam/erl_map.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_map.h b/erts/emulator/beam/erl_map.h
index cfacb2ec28..2e02ca4677 100644
--- a/erts/emulator/beam/erl_map.h
+++ b/erts/emulator/beam/erl_map.h
@@ -64,9 +64,17 @@ typedef struct map_s {
Eterm erts_maps_put(Process *p, Eterm key, Eterm value, Eterm map);
int erts_maps_update(Process *p, Eterm key, Eterm value, Eterm map, Eterm *res);
-int erts_maps_find(Eterm key, Eterm map, Eterm *value);
-int erts_maps_get(Eterm key, Eterm map, Eterm *value);
int erts_maps_remove(Process *p, Eterm key, Eterm map, Eterm *res);
int erts_validate_and_sort_map(map_t* map);
+
+#if HALFWORD_HEAP
+const Eterm *
+erts_maps_get_rel(Eterm key, Eterm map, Eterm *map_base);
+# define erts_maps_get(A, B) erts_maps_get_rel(A, B, NULL)
+#else
+const Eterm *
+erts_maps_get(Eterm key, Eterm map);
+# define erts_maps_get_rel(A, B, B_BASE) erts_maps_get(A, B)
#endif
+#endif