aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/big.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-02-03 14:42:45 +0100
committerLukas Larsson <[email protected]>2016-02-03 14:42:45 +0100
commitb200eebcf53b44ea8e5d3f1003f5a0c160b8dbbd (patch)
tree6806637c88ccaff8bb6d28d3b3e1b49ca4c19f6a /erts/emulator/beam/big.h
parent0cf09adc86c87e8b25005c6c305cb419b050c344 (diff)
parentc96b6c2f58642b457d806c0a8a5bed03d16e35f1 (diff)
downloadotp-b200eebcf53b44ea8e5d3f1003f5a0c160b8dbbd.tar.gz
otp-b200eebcf53b44ea8e5d3f1003f5a0c160b8dbbd.tar.bz2
otp-b200eebcf53b44ea8e5d3f1003f5a0c160b8dbbd.zip
Merge branch 'kvakvs/erts/list_to_integer/OTP-13293'
* kvakvs/erts/list_to_integer/OTP-13293: Better list_to_integer Moved do_list_to_integer from bif.c to big.c
Diffstat (limited to 'erts/emulator/beam/big.h')
-rw-r--r--erts/emulator/beam/big.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/erts/emulator/beam/big.h b/erts/emulator/beam/big.h
index 94f9bce10e..9c92de6b55 100644
--- a/erts/emulator/beam/big.h
+++ b/erts/emulator/beam/big.h
@@ -54,9 +54,6 @@ typedef Uint32 ErtsHalfDigit;
#error "can not determine machine size"
#endif
-#define D_DECIMAL_EXP 9
-#define D_DECIMAL_BASE 1000000000
-
typedef Uint dsize_t; /* Vector size type */
#define D_EXP (ERTS_SIZEOF_ETERM*8)
@@ -173,4 +170,15 @@ Eterm erts_sint64_to_big(Sint64, Eterm **);
Eterm erts_chars_to_integer(Process *, char*, Uint, const int);
+/* How list_to_integer classifies the input, was it even a string? */
+typedef enum {
+ LTI_BAD_STRUCTURE = 0,
+ LTI_NO_INTEGER = 1,
+ LTI_SOME_INTEGER = 2,
+ LTI_ALL_INTEGER = 3
+} LTI_result_t;
+
+LTI_result_t erts_list_to_integer(Process *BIF_P, Eterm orig_list,
+ const Uint base,
+ Eterm *integer_out, Eterm *tail_out);
#endif