core/file: Make name and subdir strings const for cache files
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
d7d553b80f
commit
48f79bdb49
|
@ -104,7 +104,7 @@ void file_init(struct file *file, const gchar *name, unsigned int min)
|
||||||
file->f_name = name;
|
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_file = NULL;
|
||||||
file->cf_name = name;
|
file->cf_name = name;
|
||||||
|
|
|
@ -55,14 +55,14 @@ struct file {
|
||||||
|
|
||||||
|
|
||||||
struct cache_file {
|
struct cache_file {
|
||||||
FILE *cf_file; /* The cache file's IO stream. */
|
FILE *cf_file; /* The cache file's IO stream. */
|
||||||
gchar *cf_name; /* The cache file's basename. */
|
const gchar *cf_name; /* The cache file's basename. */
|
||||||
gchar *cf_subdir; /* The cache file's subdirectory. */
|
const gchar *cf_subdir; /* The cache file's subdirectory. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Initialize a new file object. */
|
/* Initialize a new file object. */
|
||||||
void file_init(struct file *, const gchar *, unsigned int);
|
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.
|
* Returns the full path of the file or an empty string if filename is not set.
|
||||||
|
|
Loading…
Reference in New Issue