aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-03-01 15:43:48 +0100
committerBjörn Gustavsson <[email protected]>2010-03-10 14:26:08 +0100
commite2f78fbb4dabb19dd908821febc64acd843ad5b4 (patch)
treebe52ec71f62725a62746cfce0ba422e9820977ba /erts/emulator/beam/erl_nif.c
parent42c8a5ab9bdcf8c139f1c5a558e64d39716a6582 (diff)
downloadotp-e2f78fbb4dabb19dd908821febc64acd843ad5b4.tar.gz
otp-e2f78fbb4dabb19dd908821febc64acd843ad5b4.tar.bz2
otp-e2f78fbb4dabb19dd908821febc64acd843ad5b4.zip
Adopt the new (R13B04) Nif functionality to the halfword codebase
Change erl_int_sizes_config to include HALFWORD_HEAP_EMULATOR, which make it possible for the NIFs to figure out the term size.
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index f0c4d81f0b..41a9e17c86 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -512,9 +512,9 @@ int enif_get_int(ErlNifEnv* env, Eterm term, int* ip)
int enif_get_uint(ErlNifEnv* env, Eterm term, unsigned* ip)
{
-#if SIZEOF_LONG == ERTS_SIZEOF_ETERM
+#if SIZEOF_INT == ERTS_SIZEOF_ETERM
return term_to_Uint(term, (Uint*)ip);
-#elif SIZEOF_INT == ERTS_SIZEOF_ETERM
+#elif SIZEOF_LONG == ERTS_SIZEOF_ETERM
Uint i;
if (!term_to_Uint(term, &i) || i > UINT_MAX) {
return 0;