Turn spec versions into integers

This commit is contained in:
Lassi Kortela 2019-10-14 20:18:43 +03:00
parent 1b3b1fcaaf
commit 66af12605b
3 changed files with 8 additions and 8 deletions

View File

@ -50,8 +50,8 @@ struct builtin_library {
// Up Scheme libraries // Up Scheme libraries
#define UP_2019 (1 << 20) #define UP_2019 (1 << 20)
const char *upscheme_stable_specs[] = { 0 }; const int upscheme_stable_specs[] = { 0 };
const char upscheme_unstable_spec[] = "2019"; const int upscheme_unstable_spec = 2019;
static struct builtin_procedure builtin_procedures[] = { static struct builtin_procedure builtin_procedures[] = {
#if 0 #if 0

View File

@ -56,11 +56,11 @@ static value_t build_c_type_bits_list(void)
static value_t build_stable_specs_list(void) static value_t build_stable_specs_list(void)
{ {
struct accum acc; struct accum acc;
const char **sp; const int *p;
accum_init(&acc); accum_init(&acc);
for (sp = upscheme_stable_specs; *sp; sp++) { for (p = upscheme_stable_specs; *p; p++) {
accum_elt(&acc, string_from_cstr(*sp)); accum_elt(&acc, fixnum(*p));
} }
return acc.list; return acc.list;
} }
@ -217,7 +217,7 @@ static value_t get_version_alist(void)
accum_name_value(&acc, "upscheme/stable-specs", accum_name_value(&acc, "upscheme/stable-specs",
build_stable_specs_list()); build_stable_specs_list());
accum_name_value1(&acc, "upscheme/unstable-spec", accum_name_value1(&acc, "upscheme/unstable-spec",
string_from_cstr(upscheme_unstable_spec)); fixnum(upscheme_unstable_spec));
} }
return acc.list; return acc.list;
} }

View File

@ -1016,8 +1016,8 @@ extern const char env_release_date[];
//// #include "libraries.h" //// #include "libraries.h"
extern const char *upscheme_stable_specs[]; extern const int upscheme_stable_specs[];
extern const char upscheme_unstable_spec[]; extern const int upscheme_unstable_spec;
value_t builtin_import(value_t *args, uint32_t nargs); value_t builtin_import(value_t *args, uint32_t nargs);