overloaded append_to_array_list
instead of adding type as part of name
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ constexpr bool is_debug_build = false;
|
|||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
proc append_to_##name##_array_list(name##_Array_List* arraylist, type element) -> void { \
|
proc append_to_array_list(name##_Array_List* arraylist, type element) -> void { \
|
||||||
if (arraylist->next_index == arraylist->length) { \
|
if (arraylist->next_index == arraylist->length) { \
|
||||||
arraylist->length *= 2; \
|
arraylist->length *= 2; \
|
||||||
arraylist->data = \
|
arraylist->data = \
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@ proc apply_arguments_to_function(Lisp_Object* arguments, Function* function) ->
|
|||||||
arguments->value.pair->rest->value.pair->first,
|
arguments->value.pair->rest->value.pair->first,
|
||||||
new_env);
|
new_env);
|
||||||
|
|
||||||
append_to_String_array_list(read_in_keywords, arguments->value.pair->first->value.keyword->identifier);
|
append_to_array_list(read_in_keywords, arguments->value.pair->first->value.keyword->identifier);
|
||||||
|
|
||||||
// overstep both for next one
|
// overstep both for next one
|
||||||
arguments = arguments->value.pair->rest->value.pair->rest;
|
arguments = arguments->value.pair->rest->value.pair->rest;
|
||||||
|
|||||||
+1
-1
@@ -59,5 +59,5 @@ proc append_to_keyword_argument_list(Keyword_Arguments* args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
args->identifiers[args->next_index++] = identifier;
|
args->identifiers[args->next_index++] = identifier;
|
||||||
append_to_Lisp_Object_array_list(args->values, default_value);
|
append_to_array_list(args->values, default_value);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -69,7 +69,7 @@ namespace Memory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc delete_string(String* str) {
|
proc delete_string(String* str) {
|
||||||
append_to_Void_Ptr_array_list(free_spots_in_string_memory, (void*)str);
|
append_to_array_list(free_spots_in_string_memory, (void*)str);
|
||||||
}
|
}
|
||||||
|
|
||||||
proc duplicate_string(String* str) -> String* {
|
proc duplicate_string(String* str) -> String* {
|
||||||
|
|||||||
+1
-1
@@ -510,7 +510,7 @@ namespace Parser {
|
|||||||
try {
|
try {
|
||||||
parsed = parse_expression(text, &index_in_text);
|
parsed = parse_expression(text, &index_in_text);
|
||||||
}
|
}
|
||||||
append_to_Lisp_Object_array_list(program, parsed);
|
append_to_array_list(program, parsed);
|
||||||
} break;
|
} break;
|
||||||
case ';':
|
case ';':
|
||||||
case ' ':
|
case ' ':
|
||||||
|
|||||||
Reference in New Issue
Block a user