diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/system/fileutils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/system/fileutils.c b/src/system/fileutils.c index 86d176a..c2ffc20 100644 --- a/src/system/fileutils.c +++ b/src/system/fileutils.c @@ -5,7 +5,7 @@ #include <unistd.h> #include <stdlib.h> -int mgl_load_file(const char *filepath, mgl_filedata *filedata, mgl_file_load_options *load_options) { +int mgl_load_file(const char *filepath, mgl_filedata *filedata, const mgl_file_load_options *load_options) { const bool null_terminated = load_options ? load_options->null_terminated : false; int fd = open(filepath, O_RDONLY); @@ -51,7 +51,7 @@ void mgl_filedata_free(mgl_filedata *self) { self->size = 0; } -static int load_options_to_open_flag(mgl_memory_mapped_file_load_options *load_options) { +static int load_options_to_open_flag(const mgl_memory_mapped_file_load_options *load_options) { const bool readable = load_options ? load_options->readable : true; const bool writable = load_options ? load_options->writable : true; @@ -66,7 +66,7 @@ static int load_options_to_open_flag(mgl_memory_mapped_file_load_options *load_o return open_flag; } -static int load_options_to_mmap_prot_flag(mgl_memory_mapped_file_load_options *load_options) { +static int load_options_to_mmap_prot_flag(const mgl_memory_mapped_file_load_options *load_options) { const bool readable = load_options ? load_options->readable : true; const bool writable = load_options ? load_options->writable : true; @@ -79,7 +79,7 @@ static int load_options_to_mmap_prot_flag(mgl_memory_mapped_file_load_options *l return prot_flag; } -int mgl_mapped_file_load(const char *filepath, mgl_memory_mapped_file *memory_mapped_file, mgl_memory_mapped_file_load_options *load_options) { +int mgl_mapped_file_load(const char *filepath, mgl_memory_mapped_file *memory_mapped_file, const mgl_memory_mapped_file_load_options *load_options) { memory_mapped_file->data = NULL; memory_mapped_file->size = 0; memory_mapped_file->fd = -1; |