aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/misc/ei_x_encode.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-03-14 16:07:38 +0100
committerSverker Eriksson <[email protected]>2014-03-14 16:07:38 +0100
commit237264bc018b0cc17afeac5d3f6030073f314f9d (patch)
tree8817ef7e7e3cf6bb59d95907016ada4f96f34e86 /lib/erl_interface/src/misc/ei_x_encode.c
parentf076fc4126dd597d8681b18c23d2c76fbd4b9672 (diff)
parenta996e168bfebe599cfe393cd132a87984d905d84 (diff)
downloadotp-237264bc018b0cc17afeac5d3f6030073f314f9d.tar.gz
otp-237264bc018b0cc17afeac5d3f6030073f314f9d.tar.bz2
otp-237264bc018b0cc17afeac5d3f6030073f314f9d.zip
Merge branch 'sverk/maps-erl_interface'
* sverk/maps-erl_interface: erts: Add distribution capability flag for maps DFLAG_MAP_TAG erts: Change external format for maps erts: Document external format for maps (MAP_EXT) erl_interface: Add test for ei_skip_term of container terms erl_interface: Add map support in ei_skip_term erl_interface: Fix mem leak in ei_decode_encode_test erl_interface: test decode/encode of maps erl_interface: Add ei encode/decode for maps erl_interface: test decode_encode of tuples and lists erl_interface: refactor ei_decode_encode_test.c
Diffstat (limited to 'lib/erl_interface/src/misc/ei_x_encode.c')
-rw-r--r--lib/erl_interface/src/misc/ei_x_encode.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/erl_interface/src/misc/ei_x_encode.c b/lib/erl_interface/src/misc/ei_x_encode.c
index 14d0b56b8f..10542c88a5 100644
--- a/lib/erl_interface/src/misc/ei_x_encode.c
+++ b/lib/erl_interface/src/misc/ei_x_encode.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -206,6 +206,16 @@ int ei_x_encode_tuple_header(ei_x_buff* x, long n)
return ei_encode_tuple_header(x->buff, &x->index, n);
}
+int ei_x_encode_map_header(ei_x_buff* x, long n)
+{
+ int i = x->index;
+ if (ei_encode_map_header(NULL, &i, n) == -1)
+ return -1;
+ if (!x_fix_buff(x, i))
+ return -1;
+ return ei_encode_map_header(x->buff, &x->index, n);
+}
+
int ei_x_encode_atom(ei_x_buff* x, const char* s)
{
return ei_x_encode_atom_len_as(x, s, strlen(s), ERLANG_LATIN1, ERLANG_LATIN1);