[erlang-questions] enif_inspect_binary behaviour

Ted Burghart ted.ml.erlang@REDACTED
Thu Apr 6 14:46:42 CEST 2017


enid_inspect_binary populates the ErlNifBinary with read-only data that you should not modify.

See the section Functionality => Binaries at the top of the erl_nif manual page for how to make the data mutable.

– Ted

> On 6-Apr 2017, at 8:17 AM, Caragea Silviu <silviu.cpp@REDACTED> wrote:
> 
> Hello,
> 
> I'm using enif_inspect_binary to get the content of a binary. 
> 
> My question is if ErlNifBinary will be a copy of the erlang binary or the data member will point to the same memory location?
> 
> From my tests seems points to the same buffer as time If I change something when I return to erlang I can observe the change 
> 
> Silviu 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list