[erlang-patches] [PATCH] - Add NIF function enif_phash2

Sverker Eriksson <>
Fri Feb 8 14:39:06 CET 2013


Fredrik wrote:
> On 02/08/2013 12:58 AM, Paul Davis wrote:
>> git fetch git://github.com/davisp/otp.git enif_phash2
>>
>> https://github.com/davisp/otp/compare/maint...enif_phash2
>> https://github.com/davisp/otp/compare/maint...enif_phash2.patch
>>
>> This patch exposes the phash2 function to NIFs. It is exactly 
>> equivalent to:
>>
>> erlang:phash2(Term, 16#100000000)
>>
>> Thanks,
>> Paul Davis
>> _______________________________________________
>> erlang-patches mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-patches
> Please rebase this patch upon the current 'master' branch.
> Thanks,
>
Also read the comments in erl_nif_api_funcs.h of how to add new functions.
You do not have to increase ERL_NIF_MINOR_VERSION as I've already done 
that for R16B.

I guess you have a real use case for enif_phash2 and why erlang:phash2 
is not enough.

/Sverker


More information about the erlang-patches mailing list