switched to form char* to Strings mostly
This commit is contained in:
+8
-8
@@ -1,4 +1,4 @@
|
||||
proc create_source_code_location(const char* file, int line, int col) -> Source_Code_Location* {
|
||||
proc create_source_code_location(String* file, int line, int col) -> Source_Code_Location* {
|
||||
if (!file)
|
||||
return nullptr;
|
||||
|
||||
@@ -26,23 +26,23 @@ proc Lisp_Object_Type_to_string(Lisp_Object_Type type) -> const char* {
|
||||
|
||||
proc create_positional_argument_list(int initial_capacity) -> Positional_Arguments* {
|
||||
Positional_Arguments* ret = new(Positional_Arguments);
|
||||
ret->identifiers = (char**)malloc(initial_capacity * sizeof(char*));
|
||||
ret->identifiers = (String**)malloc(initial_capacity * sizeof(String*));
|
||||
ret->next_index = 0;
|
||||
ret->length = initial_capacity;
|
||||
return ret;
|
||||
}
|
||||
|
||||
proc append_to_positional_argument_list(Positional_Arguments* args, char* identifier) -> void {
|
||||
proc append_to_positional_argument_list(Positional_Arguments* args, String* identifier) -> void {
|
||||
if (args->next_index == args->length) {
|
||||
args->length *= 2;
|
||||
args->identifiers = (char**)realloc(args->identifiers, args->length * sizeof(char*));
|
||||
args->identifiers = (String**)realloc(args->identifiers, args->length * sizeof(String*));
|
||||
}
|
||||
args->identifiers[args->next_index++] = identifier;
|
||||
}
|
||||
|
||||
proc create_keyword_argument_list(int initial_capacity) -> Keyword_Arguments* {
|
||||
Keyword_Arguments* ret = new(Keyword_Arguments);
|
||||
ret->identifiers = (char**)malloc(initial_capacity * sizeof(char*));
|
||||
ret->identifiers = (String**)malloc(initial_capacity * sizeof(String*));
|
||||
ret->values = create_Lisp_Object_array_list(initial_capacity);
|
||||
ret->next_index = 0;
|
||||
ret->length = initial_capacity;
|
||||
@@ -50,12 +50,12 @@ proc create_keyword_argument_list(int initial_capacity) -> Keyword_Arguments* {
|
||||
}
|
||||
|
||||
proc append_to_keyword_argument_list(Keyword_Arguments* args,
|
||||
char* identifier,
|
||||
struct Lisp_Object* default_value) -> void
|
||||
String* identifier,
|
||||
Lisp_Object* default_value) -> void
|
||||
{
|
||||
if (args->next_index == args->length) {
|
||||
args->length *= 2;
|
||||
args->identifiers = (char**)realloc(args->identifiers, args->length * sizeof(char*));
|
||||
args->identifiers = (String**)realloc(args->identifiers, args->length * sizeof(String*));
|
||||
}
|
||||
|
||||
args->identifiers[args->next_index++] = identifier;
|
||||
|
||||
Reference in New Issue
Block a user