diff options
author | Micael Karlberg <[email protected]> | 2018-09-13 15:44:21 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-09-18 14:50:18 +0200 |
commit | 929ae46220f402d6f36072c46fe27ba39ad48d1b (patch) | |
tree | b51ba588683a452a13603294f3e2990526b30538 /erts/emulator/nifs/common/net_nif.c | |
parent | ee2eadd1c61d4237ee4044260665c82edf559228 (diff) | |
download | otp-929ae46220f402d6f36072c46fe27ba39ad48d1b.tar.gz otp-929ae46220f402d6f36072c46fe27ba39ad48d1b.tar.bz2 otp-929ae46220f402d6f36072c46fe27ba39ad48d1b.zip |
[socket-nif] CMsgHdr and various doc related changes
Updated the (send) cmsghdr type and the handling of it
(in the nif code). Still not tested!
Removed the is_loaded nif function.
Tried to get fix the doc build problem (socket.erl *i think*),
which causes socket.html generation to fail with:
"cannot find module exporting type"
To solve this I tried to run dialyzer on preloaded, and ran into
problems with enc_setopt_value. Update various specs and types
to "solve" this (which did not work).
Updated the nif-stub functions to make dialyzer happy.
Diffstat (limited to 'erts/emulator/nifs/common/net_nif.c')
-rw-r--r-- | erts/emulator/nifs/common/net_nif.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/erts/emulator/nifs/common/net_nif.c b/erts/emulator/nifs/common/net_nif.c index 309ad05a36..9905d99a04 100644 --- a/erts/emulator/nifs/common/net_nif.c +++ b/erts/emulator/nifs/common/net_nif.c @@ -241,9 +241,6 @@ static NetData data; extern char* erl_errno_id(int error); -static ERL_NIF_TERM nif_is_loaded(ErlNifEnv* env, - int argc, - const ERL_NIF_TERM argv[]); static ERL_NIF_TERM nif_info(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); @@ -439,8 +436,8 @@ static ErlNifResourceTypeInit netInit = { * * Utility and admin functions: * ---------------------------- - * nif_is_loaded/0 * nif_info/0 + * nif_command/1 * * The "proper" net functions: * ------------------------------ @@ -455,27 +452,6 @@ static ErlNifResourceTypeInit netInit = { /* ---------------------------------------------------------------------- - * nif_is_loaded - * - * Description: - * This functions only purpose is to return the atom 'true'. - * This will happen *if* the (socket) nif library is loaded. - * If its not, the erlang (nif_is_loaded) will instead return - * 'false'. - */ -static -ERL_NIF_TERM nif_is_loaded(ErlNifEnv* env, - int argc, - const ERL_NIF_TERM argv[]) -{ - if (argc != 0) - return enif_make_badarg(env); - - return esock_atom_true; -} - - -/* ---------------------------------------------------------------------- * nif_info * * Description: @@ -1522,7 +1498,6 @@ static ErlNifFunc net_funcs[] = { // Some utility functions - {"nif_is_loaded", 0, nif_is_loaded, 0}, {"nif_info", 0, nif_info, 0}, {"nif_command", 1, nif_command, 0}, // Shall we let this be dirty? |