fixed some const char*
This commit is contained in:
+10
-10
@@ -1,12 +1,12 @@
|
||||
namespace Parser {
|
||||
|
||||
#define inject_scl(_ret) \
|
||||
ret->sourceCodeLocation = new(Source_Code_Location); \
|
||||
ret->sourceCodeLocation->file = parser_file; \
|
||||
ret->sourceCodeLocation->line = parser_line; \
|
||||
ret->sourceCodeLocation->column = parser_col
|
||||
#define inject_scl(_ret) \
|
||||
_ret->sourceCodeLocation = new(Source_Code_Location); \
|
||||
_ret->sourceCodeLocation->file = parser_file; \
|
||||
_ret->sourceCodeLocation->line = parser_line; \
|
||||
_ret->sourceCodeLocation->column = parser_col
|
||||
|
||||
char* parser_file;
|
||||
const char* parser_file;
|
||||
int parser_line;
|
||||
int parser_col;
|
||||
|
||||
@@ -466,8 +466,8 @@ namespace Parser {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void write_expanded_file(char* file_name, Lisp_Object_Array_List* program) {
|
||||
char* ext = ".expanded";
|
||||
void write_expanded_file(const char* file_name, Lisp_Object_Array_List* program) {
|
||||
const char* ext = ".expanded";
|
||||
char* newName = (char*)calloc(4 + strlen(file_name), sizeof(char));
|
||||
strcpy(newName, file_name);
|
||||
strcat(newName, ext);
|
||||
@@ -489,9 +489,9 @@ namespace Parser {
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
Lisp_Object_Array_List* parse_program(char* file_name, char* text) {
|
||||
Lisp_Object_Array_List* parse_program(const char* file_name, char* text) {
|
||||
parser_file = (char*)malloc(strlen(file_name) * sizeof(char) + 1);
|
||||
strcpy(parser_file, file_name);
|
||||
strcpy((char *)parser_file, file_name);
|
||||
parser_line = 1;
|
||||
parser_col = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user