core/file: Remove the CACHE_FILE_INIT macro
It was only used by the testing code, so it's not seeing any use in the real world. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
d96e8ca1ca
commit
a2854ef31e
|
@ -60,13 +60,6 @@ struct cache_file {
|
|||
gchar *cf_subdir; /* The cache file's subdirectory. */
|
||||
};
|
||||
|
||||
#define CACHE_FILE_INIT(cfsubdir, cfname) \
|
||||
{ \
|
||||
.cf_file = NULL, \
|
||||
.cf_subdir = cfsubdir, \
|
||||
.cf_name = cfname, \
|
||||
}
|
||||
|
||||
/* Initialize a new file object. */
|
||||
void file_init(struct file *, const gchar *, unsigned int);
|
||||
void cache_file_init(struct cache_file *, gchar *, gchar *);
|
||||
|
|
|
@ -171,9 +171,11 @@ static void test_versioning_new()
|
|||
|
||||
static void test_cache()
|
||||
{
|
||||
struct cache_file file = CACHE_FILE_INIT("dir", "file.txt");
|
||||
struct cache_file copy = CACHE_FILE_INIT("dir", "copy.txt");
|
||||
gchar *basepath, *filepath, *writepath;
|
||||
struct cache_file file, copy;
|
||||
|
||||
cache_file_init(&file, "dir", "file.txt");
|
||||
cache_file_init(©, "dir", "copy.txt");
|
||||
|
||||
basepath = g_strjoin("/", g_get_user_cache_dir(), OCARINA_NAME, NULL);
|
||||
filepath = g_strjoin("/", basepath, "dir", "file.txt", NULL);
|
||||
|
|
Loading…
Reference in New Issue