[erlang-bugs] ERL_NIF_TERM type collision

Sverker Eriksson sverker@REDACTED
Mon Mar 19 12:27:10 CET 2012


Daniel Goertzen wrote:
> My second attempt was to hack erl_nif.h to change the definition of
> ERL_NIF_TERM to a struct containing an int, and this worked great.  But
> this is not very portable due to the custom erl_nif.h.  Also, I don't know
> enough about linkers to know for sure if this is permitted.
>
>   
I tried ERL_NIF_TERM as a struct some time ago. If I remember correctly 
I abandoned that because gcc used a different (slower) calling 
convention for functions returning struct-containing-int compared to 
functions returning plain-int.

/Sverker, Erlang/OTP Ericsson





More information about the erlang-bugs mailing list