diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-11-09 19:09:49 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-11-09 19:09:49 -0500 |
| commit | cf90418e05ced81499318c8079362053369af810 (patch) | |
| tree | c8489ca75b183539c7bd77092f62904f4735ec37 /src/stdlib | |
| parent | 4b744e5e1cfefa72a923b36f25898f0de6b803eb (diff) | |
Add back Int$from_str
Diffstat (limited to 'src/stdlib')
| -rw-r--r-- | src/stdlib/bigint.c | 2 | ||||
| -rw-r--r-- | src/stdlib/bigint.h | 1 |
2 files changed, 2 insertions, 1 deletions
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); |
