aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-04-05 19:28:01 +0200
committerSverker Eriksson <[email protected]>2019-04-12 18:28:29 +0200
commit73e1334e1d4fa8ffbfe9462ea6bdcbbcdf519566 (patch)
tree13ffa57e50a766735a235be36ba7dde6c8c5b43e /lib/erl_interface
parenta78bf4550d8bba67672624b73841c83614dd3db0 (diff)
downloadotp-73e1334e1d4fa8ffbfe9462ea6bdcbbcdf519566.tar.gz
otp-73e1334e1d4fa8ffbfe9462ea6bdcbbcdf519566.tar.bz2
otp-73e1334e1d4fa8ffbfe9462ea6bdcbbcdf519566.zip
erl_interface: Fix maps arity from ei_get_type()
Diffstat (limited to 'lib/erl_interface')
-rw-r--r--lib/erl_interface/doc/src/ei.xml10
-rw-r--r--lib/erl_interface/src/misc/get_type.c1
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml
index 26fe6f8831..d0d472c42b 100644
--- a/lib/erl_interface/doc/src/ei.xml
+++ b/lib/erl_interface/doc/src/ei.xml
@@ -731,12 +731,12 @@ ei_encode_tuple_header(buf, &amp;i, 0);</pre>
<name since=""><ret>int</ret><nametext>ei_get_type(const char *buf, const int *index, int *type, int *size)</nametext></name>
<fsummary>Fetch the type and size of an encoded term.</fsummary>
<desc>
- <p>Returns the type in <c>type</c> and size in
- <c>size</c> of the encoded term. For strings and atoms,
+ <p>Returns the type in <c>*type</c> and size in
+ <c>*size</c> of the encoded term. For strings and atoms,
size is the number of characters <em>not</em> including the
- terminating <c>NULL</c>. For binaries, <c>size</c> is the number of
- bytes. For lists and tuples, <c>size</c> is the arity of
- the object. For other types, <c>size</c> is 0. In all
+ terminating <c>NULL</c>. For binaries and bitstrings, <c>*size</c> is
+ the number of bytes. For lists, tuples and maps, <c>*size</c> is the
+ arity of the object. For other types, <c>*size</c> is 0. In all
cases, <c>index</c> is left unchanged.</p>
</desc>
</func>
diff --git a/lib/erl_interface/src/misc/get_type.c b/lib/erl_interface/src/misc/get_type.c
index 1136423902..aa8ea1176b 100644
--- a/lib/erl_interface/src/misc/get_type.c
+++ b/lib/erl_interface/src/misc/get_type.c
@@ -55,6 +55,7 @@ int ei_get_type(const char *buf, const int *index, int *type, int *len)
case ERL_LARGE_TUPLE_EXT:
case ERL_LIST_EXT:
+ case ERL_MAP_EXT:
case ERL_BINARY_EXT:
*len = get32be(s);
break;