Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble encoding dict #2

Open
appush opened this issue Apr 20, 2010 · 2 comments
Open

Having trouble encoding dict #2

appush opened this issue Apr 20, 2010 · 2 comments

Comments

@appush
Copy link

appush commented Apr 20, 2010

Erlang R13B04

D1 = dict:new().
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}
D2 = dict:store(one,1,D1).
{dict,1,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],[],[],[[one|1]],[],[],[],[],[],[],[],[],[],[]}}}
bert:encode(D2).
** exception error: no function clause matching lists:map(#Fun<bert.0.13327860>,1)
in function lists:map/2
in call from lists:map/2
in call from lists:map/2
in call from bert:encode_term/1
in call from lists:map/2
in call from bert:encode_term/1
in call from lists:map/2

@woahdae
Copy link

woahdae commented Jul 29, 2010

Ditto

@woahdae
Copy link

woahdae commented Jul 29, 2010

Most forks of the project are to fix this, but they do it in an obviously backwards-incompatible way. This change looks to be backwards compatible, and more importantly, more resistant to future change. I only tested it on R14A, but I'd be suprised if they changed the internal representation of a dict from a tuple with the first element of "dict".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants