Age | Commit message (Collapse) | Author |
|
Conflicts:
erts/emulator/test/nif_SUITE.erl
erts/emulator/test/nif_SUITE_data/nif_SUITE.c
sverker/enif_make_int64-halfword/OTP-9394
|
|
* sverker/enif_make_int64-halfword/OTP-9394:
Fix halfword bug in enif_make_int64
|
|
|
|
|
|
|
|
The bug was creating an invalid bignum instead of a small integer,
causing strange comparing behavior (=:= failed but == succeeded).
|
|
|
|
Add the enif_is_exception function to allow callers to determine
whether an ERL_NIF_TERM represents an exception. (Currently the only
supported exception is badarg since only enif_make_badarg exists, but
this will likely be expanded in future releases.) This allows NIF code
to call other NIF functions that return ERL_NIF_TERM and properly
check to see if the returned terms are exceptions. Without the
enif_is_exception function, developers have to create their own means
of checking whether a function creates an exception, such as returning
boolean success/failure indicators or some other special value
indicating that an exception is in effect.
The declaration of enif_is_exception in erl_nif_api_funcs.h respects
the order of declarations required to keep compatibility on Windows.
Add a new test to verify the operation of enif_is_exception.
Modify the erl_nif man page to add a description of enif_is_exception
and also to clarify the requirements of calling the enif_make_badarg
function. If code calls enif_make_badarg, the env passed in gets set
with exception information and so the return value of the calling
function MUST be the badarg term returned from enif_make_badarg. Also
clarify that the result of enif_make_badarg may be passed only to
enif_is_exception and not to any other NIF API functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
erlang:decode_packet/3) to work with 8 bits characters
|
|
New NIF features:
Send messages from a NIF, or from thread created by NIF, to any local
process (enif_send)
Store terms between NIF calls (enif_alloc_env, enif_make_copy)
Create binary terms with user defined memory management
(enif_make_resource_binary)
|
|
Add new NIF API functions
- enif_make_atom_len
- enif_make_existing_atom_len
- enif_make_string_len
These are basically the same as enif_make_atom,
enif_make_existing_atom and enif_make_string except that the
new functions require a length parameter instead of a
null-terminated C-string.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
Add new NIF API functions
- enif_get_atom_length
- enif_get_list_length
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
Add new NIF API functions
- enif_is_list
- enif_is_tuple
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
|
|
NIF function prototypes in order to allow more than 3 function
arguments. Also an incompatible change in the return value of
erlang:load_nif/2. Added support for references, floats and term
comparison in NIFs. Read more in the documentation of erl_nif and
erlang:load_nif/2.
|
|
NIF function prototypes in order to allow more than 3 function
arguments. Also an incompatible change in the return value of
erlang:load_nif/2. Added support for references, floats and term
comparison in NIFs. Read more in the documentation of erl_nif and
erlang:load_nif/2.
|
|
|