<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 18, 2016 at 7:14 AM, Caragea Silviu <span dir="ltr"><<a href="mailto:silviu.cpp@gmail.com" target="_blank">silviu.cpp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello having two ErlNifPid how I can compare them to know if they refer to the same PID or not ?<br><br></div>Other than avoiding calling enif_make_pid like:<br><div><div><br>enif_is_identical(enif_make_pid(env, &pid1), enif_make_pid(env, &pid2))</div></div></div></blockquote><div><br></div><div>This is the right way to do it. ErlNifPid is a struct with a term member but is documented to be an opaque type, so you're not supposed to access its term directly. But note that enif_make_pid is a C macro that does exactly that, so there's no function call overhead from using it.</div><div><br></div><div>--steve</div></div></div></div>