aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_term.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-03-10 19:57:07 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-12 19:15:34 +0100
commit2fadbefc264d33da526ec61cffc9847f724d8d92 (patch)
tree5359fe987ea2a5e991ffe4fe0298ac264dde0ae3 /erts/emulator/beam/erl_term.h
parent27e57aa05354b743b735a41716c0e3af18f2843e (diff)
downloadotp-2fadbefc264d33da526ec61cffc9847f724d8d92.tar.gz
otp-2fadbefc264d33da526ec61cffc9847f724d8d92.tar.bz2
otp-2fadbefc264d33da526ec61cffc9847f724d8d92.zip
erts: Reintroduce is_map macro
as shorthand for is_flatmap || is_hashmap
Diffstat (limited to 'erts/emulator/beam/erl_term.h')
-rw-r--r--erts/emulator/beam/erl_term.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_term.h b/erts/emulator/beam/erl_term.h
index 6d97344868..1625a4ec15 100644
--- a/erts/emulator/beam/erl_term.h
+++ b/erts/emulator/beam/erl_term.h
@@ -1019,6 +1019,9 @@ _ET_DECLARE_CHECKED(struct erl_node_*,external_ref_node,Eterm)
#define hashmap_val(x) _unchecked_boxed_val((x))
#define hashmap_val_rel(RTERM, BASE) hashmap_val(rterm2wterm(RTERM, BASE))
+#define is_map(x) (is_flatmap(x) || is_hashmap(x))
+#define is_map_rel(x,BASE) (is_flatmap_rel(x,BASE) || is_hashmap_rel(x,BASE))
+
/* number tests */
#define is_integer(x) (is_small(x) || is_big(x))