aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/erts_internal.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-12-12 10:58:59 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-01-29 11:08:41 +0100
commit76b8ea8ab1eb4ce099f88ccb8d1721c438d0ada4 (patch)
treeeb511b92e2259dd6239617d22c0540bad2e7b0c1 /erts/preloaded/src/erts_internal.erl
parentd5c238473b9cec819d93faaef4ccc00ddb60465f (diff)
downloadotp-76b8ea8ab1eb4ce099f88ccb8d1721c438d0ada4.tar.gz
otp-76b8ea8ab1eb4ce099f88ccb8d1721c438d0ada4.tar.bz2
otp-76b8ea8ab1eb4ce099f88ccb8d1721c438d0ada4.zip
erts: Add BIF erts_internal:cmp_term/2
Compares terms where integer() < float().
Diffstat (limited to 'erts/preloaded/src/erts_internal.erl')
-rw-r--r--erts/preloaded/src/erts_internal.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index d6a185482e..88eb317f1d 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -170,3 +170,13 @@ binary_to_term(_Binary) ->
Opts :: [safe].
binary_to_term(_Binary, _Opts) ->
erlang:nif_error(undefined).
+
+%% term compare where integer() < float() = true
+
+-spec cmp_term(A,B) -> Result when
+ A :: term(),
+ B :: term(),
+ Result :: -1 | 0 | 1.
+
+cmp_term(_A,_B) ->
+ erlang:nif_error(undefined).