From 12f470ed103c0da850785f5085019dcf266acb8a Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Fri, 11 Dec 2020 18:28:09 -0600 Subject: [PATCH] Use :_name instead of :name for printing tagged tables. --- CHANGELOG.md | 2 ++ src/core/pp.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f714acb3..02fedabe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. ## Unreleased - ??? +- Pretty printing a table with a prototype will look for `:_name` instead of `:name` + in the prototype table to tag the output. - `match` macro implemtentation cahned to be tail recursive. - Adds a :preload loader which allows one to manually put things into `module/cache`. - Add `buffer/push` function. diff --git a/src/core/pp.c b/src/core/pp.c index 1fcc1e18..65a8d755 100644 --- a/src/core/pp.c +++ b/src/core/pp.c @@ -565,7 +565,7 @@ static void janet_pretty_one(struct pretty *S, Janet x, int is_dict_value) { JanetTable *t = janet_unwrap_table(x); JanetTable *proto = t->proto; if (NULL != proto) { - Janet name = janet_table_get(proto, janet_ckeywordv("name")); + Janet name = janet_table_get(proto, janet_ckeywordv("_name")); const uint8_t *n; int32_t len; if (janet_bytes_view(name, &n, &len)) {