Initializers for Boolean values.

This commit is contained in:
Simon Forman 2023-02-07 20:53:44 -08:00
parent 94bcd2aa51
commit 2b54c0bc0a
1 changed files with 5 additions and 14 deletions

View File

@ -44,10 +44,12 @@ const char *BLANKS = " \t";
const char *FALSE = "false";
const char *TRUE = "true";
JoyTypePtr JoyTrue;
JoyTypePtr JoyFalse;
JoyType loop_symbol = {joySymbol, {"loop"}};
JoyType JoyTrueVal = {joyTrue, {NULL}};
JoyType JoyFalseVal = {joyFalse, {NULL}};
JoyTypePtr JoyTrue = &JoyTrueVal;
JoyTypePtr JoyFalse = &JoyFalseVal;
void*
@ -800,17 +802,6 @@ main(void)
JoyList expression = EMPTY_LIST;
JoyList s;
/* Initialize Boolean singleton values. */
JoyTrue = newJoyType;
JoyTrue->kind = joyTrue;
JoyFalse= newJoyType;
JoyFalse->kind = joyFalse;
/*
I would like to define this at compile-time, but I
couldn't figure out the right syntax for initializer
for JoyType.value. (T_T)
*/
mp_set_memory_functions(
&GC_malloc,
&reallocate_function,