diff --git a/core/file.c b/core/file.c index 19c5dd2e..ec9c02e1 100644 --- a/core/file.c +++ b/core/file.c @@ -104,7 +104,7 @@ void file_init(struct file *file, const gchar *name, unsigned int min) file->f_name = name; } -void cache_file_init(struct cache_file *file, gchar *subdir, gchar *name) +void cache_file_init(struct cache_file *file, const gchar *subdir, const gchar *name) { file->cf_file = NULL; file->cf_name = name; diff --git a/include/core/file.h b/include/core/file.h index 5c3c50eb..bb78b405 100644 --- a/include/core/file.h +++ b/include/core/file.h @@ -55,14 +55,14 @@ struct file { struct cache_file { - FILE *cf_file; /* The cache file's IO stream. */ - gchar *cf_name; /* The cache file's basename. */ - gchar *cf_subdir; /* The cache file's subdirectory. */ + FILE *cf_file; /* The cache file's IO stream. */ + const gchar *cf_name; /* The cache file's basename. */ + const gchar *cf_subdir; /* The cache file's subdirectory. */ }; /* Initialize a new file object. */ void file_init(struct file *, const gchar *, unsigned int); -void cache_file_init(struct cache_file *, gchar *, gchar *); +void cache_file_init(struct cache_file *, const gchar *, const gchar *); /* * Returns the full path of the file or an empty string if filename is not set.