From 3c25f24d59a1233eda3d6c9679729ff7c42553b4 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Mon, 14 Oct 2019 19:42:20 +0300 Subject: [PATCH] Add Upscheme specs to version alist --- c/main.c | 16 ++++++++++++++++ c/scheme.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/c/main.c b/c/main.c index 1d08f35..baed47a 100644 --- a/c/main.c +++ b/c/main.c @@ -53,6 +53,18 @@ static value_t build_c_type_bits_list(void) return acc.list; } +static value_t build_stable_specs_list(void) +{ + struct accum acc; + const char **sp; + + accum_init(&acc); + for (sp = upscheme_stable_specs; *sp; sp++) { + accum_elt(&acc, string_from_cstr(*sp)); + } + return acc.list; +} + static value_t build_platform_list(void) { struct accum acc; @@ -203,6 +215,10 @@ static value_t get_version_alist(void) accum_name_value1(&acc, "release", string_from_cstr(env_release)); accum_name_value1(&acc, "release-date", string_from_cstr(env_release_date)); + accum_name_value(&acc, "upscheme/stable-specs", + build_stable_specs_list()); + accum_name_value1(&acc, "upscheme/unstable-spec", + string_from_cstr(upscheme_unstable_spec)); } return acc.list; } diff --git a/c/scheme.h b/c/scheme.h index 49b1d4e..7b75b31 100644 --- a/c/scheme.h +++ b/c/scheme.h @@ -1016,6 +1016,9 @@ extern const char env_release_date[]; //// #include "libraries.h" +extern const char *upscheme_stable_specs[]; +extern const char upscheme_unstable_spec[]; + value_t builtin_import(value_t *args, uint32_t nargs); //// #include "builtins.h"