aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_map.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-10-28 15:08:05 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-10-28 15:08:05 +0100
commit6e30d2a47c2a2bded04b2a411161147cba7aca51 (patch)
treea9a6b59b2807b25277e4b8323987b2c7d30e08c2 /erts/emulator/beam/erl_map.h
parentb1c1a40410c62273dd00e9ca1e29cf3056d41b67 (diff)
parenta2ffd6fd0e7f693847450aa633f7a4a18f9baead (diff)
downloadotp-6e30d2a47c2a2bded04b2a411161147cba7aca51.tar.gz
otp-6e30d2a47c2a2bded04b2a411161147cba7aca51.tar.bz2
otp-6e30d2a47c2a2bded04b2a411161147cba7aca51.zip
Merge branch 'egil/nox/maps-match_specs/OTP-12270'
* egil/nox/maps-match_specs/OTP-12270: erts: Fix return value from erts_maps_get to be const Properly support maps in match_specs Support maps in ms_transform Return pointer to value in erts_maps_get()
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