1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-30 23:23:07 +00:00

Add description, short-description, and tostring as

separate stringifiers that have slightly different semantics.
description is for debugging, short-description is also
for debugging but prints less, and tostring is for coercing to
a string (similar to description, but strings are not changed and
buffers return their contents as a string).
This commit is contained in:
bakpakin
2017-07-02 14:16:37 -04:00
parent 2742e3679d
commit db89a6c7ee
5 changed files with 153 additions and 90 deletions

View File

@@ -515,6 +515,8 @@ int gst_equals(GstValue x, GstValue y);
const char *gst_get(GstValue ds, GstValue key, GstValue *out);
const char *gst_set(Gst *vm, GstValue ds, GstValue key, GstValue value);
const uint8_t *gst_to_string(Gst *vm, GstValue x);
const uint8_t *gst_description(Gst *vm, GstValue x);
const uint8_t *gst_short_description(Gst *vm, GstValue x);
uint32_t gst_hash(GstValue x);
GstInteger gst_length(Gst *vm, GstValue x);