<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>It would be handy to have the same functionality that is provided by erlang:term_to_binary and erlang:binary_to_term available to a NIF author.</div><div><br></div><div><div> erlang:term_to_binary(term()) -> ext_binary()</div><div><div> erlang:binary_to_term(ext_binary()) -> term()</div><div><br></div></div></div><div>except in C where term() is ERL_NIF_TERM and ext_binary() is ErlNifBinary.</div><div><br></div><div>- Joe</div><div><br></div><div><br>
</div>
<br><div><div>On Sep 3, 2011, at 4:04 PM, Rapsey wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I'm not sure what you mean. There is:<br><a name="enif_inspect_binary"><span class="bold_code">enif_inspect_binary<br></span></a><a name="enif_inspect_iolist_as_binary"><span class="bold_code">enif_inspect_iolist_as_binary<br>
</span></a><a name="enif_make_binary"><span class="bold_code">enif_make_binary<br><br>What's missing?<br><br><br>Sergej<br></span></a><a name="enif_inspect_iolist_as_binary"><span class="bold_code"><br></span></a><a name="enif_inspect_binary"><span class="bold_code"><br>
</span></a><br><div class="gmail_quote">On Sat, Sep 3, 2011 at 7:12 AM, Joseph Norton <span dir="ltr"><<a href="mailto:norton@lovely.email.ne.jp">norton@lovely.email.ne.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
For the erl_nif module, are there any plans to add API calls for nif_to_binary and binary_to_nif?<br>
<br>
regards,<br>
<br>
Joseph Norton<br>
<br>
<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>
</blockquote></div><br></body></html>