aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2017-02-27 11:04:13 +0100
committerBjörn-Egil Dahlberg <[email protected]>2017-02-27 11:04:13 +0100
commit3202e753383d495bce8008721e94428788d4f400 (patch)
treeb5e86cab9c05ee99f0aa60b3e9b9d5fe999dfda9 /erts/preloaded
parent3d0531bcc56810ed8e651dc401bae75a1b227682 (diff)
parentb64d1a7c0ce33dd741a389a3ba88350421883118 (diff)
downloadotp-3202e753383d495bce8008721e94428788d4f400.tar.gz
otp-3202e753383d495bce8008721e94428788d4f400.tar.bz2
otp-3202e753383d495bce8008721e94428788d4f400.zip
Merge branch 'egil/pretty-print-maps-smaller/OTP-14239'
* egil/pretty-print-maps-smaller/OTP-14239: stdlib: Use erts_internal:maps_to_list/2 in io_lib_pretty Update preloaded erts_internal.beam erts: Test erts_internal:maps_to_list/2 erts: Introduce erts_internal:maps_to_list/2
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/ebin/erts_internal.beambin10876 -> 11072 bytes
-rw-r--r--erts/preloaded/src/erts_internal.erl12
2 files changed, 11 insertions, 1 deletions
diff --git a/erts/preloaded/ebin/erts_internal.beam b/erts/preloaded/ebin/erts_internal.beam
index fe99cc769b..c0ff53f503 100644
--- a/erts/preloaded/ebin/erts_internal.beam
+++ b/erts/preloaded/ebin/erts_internal.beam
Binary files differ
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.