1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 00:10:27 +00:00

Formatting cleanup.

This commit is contained in:
Calvin Rose 2022-02-24 18:07:22 -06:00
parent 408b03ae0d
commit 56ba1d9cd3
2 changed files with 5 additions and 5 deletions

View File

@ -341,8 +341,8 @@ JANET_CORE_FN(janet_core_describe,
"(describe x)",
"Returns a string that is a human-readable description of `x`. "
"For recursive data structures, the string returned contains a "
"more or less unique pointer value from which the identity of `x` "
"could be determined.") {
"pointer value from which the identity of `x` "
"can be determined.") {
JanetBuffer *b = janet_buffer(0);
for (int32_t i = 0; i < argc; ++i)
janet_description_b(b, argv[i]);

View File

@ -212,10 +212,10 @@ JANET_CORE_FN(cfun_to_number,
"Convert an int/u64 or int/s64 to a number. Fails if the number is out of range for an int32.") {
janet_fixarity(argc, 1);
if (janet_type(argv[0]) == JANET_ABSTRACT) {
void* abst = janet_unwrap_abstract(argv[0]);
void *abst = janet_unwrap_abstract(argv[0]);
if (janet_abstract_type(abst) == &janet_s64_type) {
int64_t value = *((int64_t*)abst);
int64_t value = *((int64_t *)abst);
if (value > JANET_INTMAX_INT64) {
janet_panicf("cannot convert %q to a number, must be in the range [%q, %q]", argv[0], janet_wrap_number(JANET_INTMIN_DOUBLE), janet_wrap_number(JANET_INTMAX_DOUBLE));
}
@ -226,7 +226,7 @@ JANET_CORE_FN(cfun_to_number,
}
if (janet_abstract_type(abst) == &janet_u64_type) {
uint64_t value = *((uint64_t*)abst);
uint64_t value = *((uint64_t *)abst);
if (value > JANET_INTMAX_INT64) {
janet_panicf("cannot convert %q to a number, must be in the range [%q, %q]", argv[0], janet_wrap_number(JANET_INTMIN_DOUBLE), janet_wrap_number(JANET_INTMAX_DOUBLE));
}