aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2017-02-22 16:52:29 +0100
committerBjörn-Egil Dahlberg <[email protected]>2017-02-23 10:10:54 +0100
commitd8c0f76c800051629cd9cf7279bf075435708a1c (patch)
tree04156d46a4fa8a433e4314ab812590d7590b94e1 /erts/preloaded
parent82b184fee07c78583a7198f1da022a9da7e87260 (diff)
downloadotp-d8c0f76c800051629cd9cf7279bf075435708a1c.tar.gz
otp-d8c0f76c800051629cd9cf7279bf075435708a1c.tar.bz2
otp-d8c0f76c800051629cd9cf7279bf075435708a1c.zip
erts: Introduce erts_internal:maps_to_list/2
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/src/erts_internal.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index a27cb2ba38..bcc779e6f6 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -31,7 +31,8 @@
-export([await_port_send_result/3]).
-export([cmp_term/2]).
--export([map_to_tuple_keys/1, term_type/1, map_hashmap_children/1]).
+-export([map_to_tuple_keys/1, term_type/1, map_hashmap_children/1,
+ maps_to_list/2]).
-export([open_port/2, port_command/3, port_connect/2, port_close/1,
port_control/3, port_call/3, port_info/1, port_info/2]).
@@ -369,6 +370,15 @@ map_hashmap_children(_M) ->
Multi :: boolean(),
Res :: term().
+%% return a list of key value pairs, at most of length N
+-spec maps_to_list(M,N) -> Pairs when
+ M :: map(),
+ N :: integer(),
+ Pairs :: list().
+
+maps_to_list(_M, _N) ->
+ erlang:nif_error(undefined).
+
%% erlang:demonitor(Ref, [flush]) traps to
%% erts_internal:flush_monitor_messages(Ref, Res) when
%% it needs to flush monitor messages.