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

Fix enif_binary_to_term function declaration mismatch warning #7930

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion erts/doc/src/erl_nif.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ typedef struct {
<func>
<name since="OTP 19.0"><ret>size_t</ret><nametext>enif_binary_to_term(ErlNifEnv *env,
const unsigned char* data, size_t size, ERL_NIF_TERM *term,
ErlNifBinaryToTerm opts)</nametext></name>
unsigned int opts)</nametext></name>
<fsummary>Create a term from the external format.</fsummary>
<desc>
<p>Creates a term that is the result of decoding the binary data at
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/beam/erl_nif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ size_t enif_binary_to_term(ErlNifEnv *dst_env,
const unsigned char* data,
size_t data_sz,
ERL_NIF_TERM *term,
ErlNifBinaryToTerm opts)
unsigned int opts)
{
Sint size;
ErtsHeapFactory factory;
Expand Down
3 changes: 1 addition & 2 deletions erts/emulator/test/nif_SUITE_data/nif_SUITE.c
Original file line number Diff line number Diff line change
Expand Up @@ -2558,8 +2558,7 @@ static ERL_NIF_TERM binary_to_term(ErlNifEnv* env, int argc, const ERL_NIF_TERM
/* build dummy heap term first to provoke OTP-15080 */
dummy = enif_make_list_cell(msg_env, atom_true, atom_false);

ret = enif_binary_to_term(msg_env, bin.data, bin.size, &term,
(ErlNifBinaryToTerm)opts);
ret = enif_binary_to_term(msg_env, bin.data, bin.size, &term, opts);
if (!ret)
return atom_false;

Expand Down
Loading