From c4035b2273c53f34514ab78942d51d5b946024db Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Sun, 21 Jun 2020 17:54:06 +0900 Subject: [PATCH 1/2] Change string representation of nil to empty string --- src/core/pp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/pp.c b/src/core/pp.c index 59acba1b..3a855536 100644 --- a/src/core/pp.c +++ b/src/core/pp.c @@ -188,7 +188,7 @@ static void janet_escape_buffer_b(JanetBuffer *buffer, JanetBuffer *bx) { void janet_to_string_b(JanetBuffer *buffer, Janet x) { switch (janet_type(x)) { case JANET_NIL: - janet_buffer_push_cstring(buffer, "nil"); + janet_buffer_push_cstring(buffer, ""); break; case JANET_BOOLEAN: janet_buffer_push_cstring(buffer, @@ -277,6 +277,9 @@ void janet_description_b(JanetBuffer *buffer, Janet x) { switch (janet_type(x)) { default: break; + case JANET_NIL: + janet_buffer_push_cstring(buffer, "nil"); + return; case JANET_KEYWORD: janet_buffer_push_u8(buffer, ':'); break; From 51bf8a35385f5008c67df4a9a25b92eec6862f9d Mon Sep 17 00:00:00 2001 From: Jason Pepas Date: Fri, 26 Jun 2020 04:11:21 -0500 Subject: [PATCH 2/2] Add ppc to os/arch --- src/core/os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/os.c b/src/core/os.c index 6f68fafe..837375cb 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -159,6 +159,8 @@ static Janet os_arch(int32_t argc, Janet *argv) { return janet_ckeywordv("arm"); #elif (defined(__sparc__)) return janet_ckeywordv("sparc"); +#elif (defined(__ppc__)) + return janet_ckeywordv("ppc"); #else return janet_ckeywordv("unknown"); #endif