From cf90418e05ced81499318c8079362053369af810 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 9 Nov 2025 19:09:49 -0500 Subject: Add back Int$from_str --- src/stdlib/bigint.c | 2 +- src/stdlib/bigint.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/stdlib') diff --git a/src/stdlib/bigint.c b/src/stdlib/bigint.c index be01a001..5e8986d1 100644 --- a/src/stdlib/bigint.c +++ b/src/stdlib/bigint.c @@ -393,7 +393,7 @@ PUREFUNC Closure_t Int$onward(Int_t first, Int_t step) { } public -Int_t Int$from_str(const char *str) { +OptionalInt_t Int$from_str(const char *str) { mpz_t i; int result; if (strncmp(str, "0x", 2) == 0) { diff --git a/src/stdlib/bigint.h b/src/stdlib/bigint.h index 87f77058..e50a6847 100644 --- a/src/stdlib/bigint.h +++ b/src/stdlib/bigint.h @@ -23,6 +23,7 @@ Text_t Int$hex(Int_t i, Int_t digits, bool uppercase, bool prefix); Text_t Int$octal(Int_t i, Int_t digits, bool prefix); PUREFUNC Closure_t Int$to(Int_t first, Int_t last, OptionalInt_t step); PUREFUNC Closure_t Int$onward(Int_t first, Int_t step); +OptionalInt_t Int$from_str(const char *str); OptionalInt_t Int$parse(Text_t text, Text_t *remainder); Int_t Int$abs(Int_t x); Int_t Int$power(Int_t base, Int_t exponent); -- cgit v1.2.3