Add support for non-byte-aligned bitstrings - #2357
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
7733d77 to
d0cfee6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
7e4ce63 to
96323ce
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6dff33e to
5742dda
Compare
|
AMP, pick and choose: Review of
|
103960a to
4a28a85
Compare
bettio
left a comment
There was a problem hiding this comment.
First review round. I didn't finish review yet but I start reporting the issues.
Found the following issues outside the changed files:
-
io_lib cannot format bitstrings. io_lib:format("~p", [<<1:1>>]). Same applies for `
w. -
binary:decode_hex/1returns silently wrong data for bitstrings;encode_hexaccepts them.
binary:decode_hex(<<"AB", 1:9>>) %% here: <<171>> OTP: error
binary:encode_hex(<<1:4>>) %% here: <<"1">> OTP: badarg - tests/erlang_tests/test_is_bitstring_is_binary.erl: I think we should update this file:
34 % bitstrings are currently unsupported
35 % true = is_bitstring(id(<<1:1>>)),
44 % bitstrings are currently unsupported
45 % false = is_binary(id(<<1:1>>)),
|
I think all comments addressed so far, plus some more things I noticed reviewing again on my end (e.g. difference with beam doc). |
Also fix iolist and chardata functions accepting an integer improper tail. Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Continuation of:
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later