search for: ei_x_encode_string

Displaying 1 result from an estimated 1 matches for "ei_x_encode_string".

2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...sg = erl_mk_string (guestfs_last_error (g)); - ETERM *num = erl_mk_int (guestfs_last_errno (g)); - ETERM *t[3] = { error, msg, num }; - return erl_mk_tuple (t, 3); + if (ei_x_encode_tuple_header (buff, 3) != 0) return -1; + if (ei_x_encode_atom (buff, "error") != 0) return -1; + if (ei_x_encode_string (buff, guestfs_last_error (g)) != 0) return -1; + if (ei_x_encode_long (buff, guestfs_last_errno (g)) != 0) return -1; + return 0; } -ETERM * -unknown_function (ETERM *fun) +int +unknown_function (ei_x_buff *buff, const char *fun) { - ETERM *unknown = erl_mk_atom ("unknown"); - ET...