Use built-in nif for integer_to_binary/binary_to_integer
This commit is contained in:
parent
88c9991f90
commit
cfe0aea219
|
@ -872,16 +872,16 @@ binary_to_atom(Bin) ->
|
|||
erlang:binary_to_atom(Bin, utf8).
|
||||
|
||||
binary_to_integer(Bin) ->
|
||||
list_to_integer(binary_to_list(Bin)).
|
||||
erlang:binary_to_integer(Bin).
|
||||
|
||||
binary_to_integer(Bin, Base) ->
|
||||
list_to_integer(binary_to_list(Bin), Base).
|
||||
erlang:binary_to_integer(Bin, Base).
|
||||
|
||||
integer_to_binary(I) ->
|
||||
list_to_binary(integer_to_list(I)).
|
||||
erlang:integer_to_binary(I).
|
||||
|
||||
integer_to_binary(I, Base) ->
|
||||
list_to_binary(erlang:integer_to_list(I, Base)).
|
||||
erlang:integer_to_binary(I, Base).
|
||||
|
||||
tuple_to_binary(T) ->
|
||||
iolist_to_binary(tuple_to_list(T)).
|
||||
|
|
Loading…
Reference in New Issue