From df2d0414837ec0b53836f9c32e0f93d3baaefb14 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 Feb 2012 20:07:30 +0100 Subject: database: add "pure" attributes --- src/database.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/database.h b/src/database.h index b71ae726..f877b74d 100644 --- a/src/database.h +++ b/src/database.h @@ -47,6 +47,7 @@ db_finish(void); * Returns the root directory object. Returns NULL if there is no * configured music directory. */ +G_GNUC_PURE struct directory * db_get_root(void); @@ -54,10 +55,12 @@ db_get_root(void); * Caller must lock the #db_mutex. */ gcc_nonnull(1) +G_GNUC_PURE struct directory * db_get_directory(const char *name); gcc_nonnull(1) +G_GNUC_PURE struct song * db_get_song(const char *file); @@ -79,12 +82,14 @@ db_save(GError **error_r); bool db_load(GError **error); +G_GNUC_PURE time_t db_get_mtime(void); /** * Returns true if there is a valid database file on the disk. */ +G_GNUC_PURE static inline bool db_exists(void) { -- cgit v1.2.3