diff options
author | Björn-Egil Dahlberg <egil@erlang.org> | 2014-04-30 14:47:24 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <egil@erlang.org> | 2014-04-30 14:47:24 +0200 |
commit | 88fb069f83c39a47f65809ee5d6e7cadc170e56b (patch) | |
tree | ddc3c6dd2fa61262582eae2e8b52d895d4f96e81 /erts/emulator/beam/erl_map.c | |
parent | aca0b6182b039333b4c963938878d9eecc85e5a1 (diff) | |
download | otp-88fb069f83c39a47f65809ee5d6e7cadc170e56b.tar.gz otp-88fb069f83c39a47f65809ee5d6e7cadc170e56b.tar.bz2 otp-88fb069f83c39a47f65809ee5d6e7cadc170e56b.zip |
erts: Add erts_internal:map_to_tuple_keys/1
* Used for introspection.
* Will return the internal key tuple if applicable
* Not documented - not for public use
Diffstat (limited to 'erts/emulator/beam/erl_map.c')
-rw-r--r-- | erts/emulator/beam/erl_map.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c index fdd2d0c0f6..5e740aacdd 100644 --- a/erts/emulator/beam/erl_map.c +++ b/erts/emulator/beam/erl_map.c @@ -58,6 +58,8 @@ * - maps:size/1 * - maps:without/2 * + * DEBUG: for sharing calculation + * - erts_internal:map_to_tuple_keys/1 */ /* erlang:map_size/1 @@ -819,3 +821,17 @@ int erts_validate_and_sort_map(map_t* mp) } return 1; } + +/* + * erts_internal:map_to_tuple_keys/1 + * + * Used in erts_debug:size/1 + */ + +BIF_RETTYPE erts_internal_map_to_tuple_keys_1(BIF_ALIST_1) { + if (is_map(BIF_ARG_1)) { + map_t *mp = (map_t*)map_val(BIF_ARG_1); + BIF_RET(mp->keys); + } + BIF_ERROR(BIF_P, BADARG); +} |