Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Make enif_protobuf work properly with proto3 defaulty fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagabond committed Mar 8, 2022
1 parent ca9f90b commit dc31759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
]}.

{gpb_opts, [
{introspect_proto_defs_version, 2},
{i, "src"},
{o_erl, "src/pb"},
{o_hrl, "src/pb"},
Expand Down
2 changes: 1 addition & 1 deletion src/peerbook/libp2p_peer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -461,5 +461,5 @@ encode_map(Map) ->
end, [], Map)).

load_pb_msg_defs() ->
ok = enif_protobuf:load_cache(libp2p_peer_pb:get_msg_defs()),
ok = enif_protobuf:load_cache(libp2p_peer_pb:get_proto_defs()),
enif_protobuf:set_opts([{string_as_list, true}]).

0 comments on commit dc31759

Please sign in to comment.