database: add "pure" attributes
This commit is contained in:
@@ -47,6 +47,7 @@ db_finish(void);
|
|||||||
* Returns the root directory object. Returns NULL if there is no
|
* Returns the root directory object. Returns NULL if there is no
|
||||||
* configured music directory.
|
* configured music directory.
|
||||||
*/
|
*/
|
||||||
|
G_GNUC_PURE
|
||||||
struct directory *
|
struct directory *
|
||||||
db_get_root(void);
|
db_get_root(void);
|
||||||
|
|
||||||
@@ -54,10 +55,12 @@ db_get_root(void);
|
|||||||
* Caller must lock the #db_mutex.
|
* Caller must lock the #db_mutex.
|
||||||
*/
|
*/
|
||||||
gcc_nonnull(1)
|
gcc_nonnull(1)
|
||||||
|
G_GNUC_PURE
|
||||||
struct directory *
|
struct directory *
|
||||||
db_get_directory(const char *name);
|
db_get_directory(const char *name);
|
||||||
|
|
||||||
gcc_nonnull(1)
|
gcc_nonnull(1)
|
||||||
|
G_GNUC_PURE
|
||||||
struct song *
|
struct song *
|
||||||
db_get_song(const char *file);
|
db_get_song(const char *file);
|
||||||
|
|
||||||
@@ -79,12 +82,14 @@ db_save(GError **error_r);
|
|||||||
bool
|
bool
|
||||||
db_load(GError **error);
|
db_load(GError **error);
|
||||||
|
|
||||||
|
G_GNUC_PURE
|
||||||
time_t
|
time_t
|
||||||
db_get_mtime(void);
|
db_get_mtime(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if there is a valid database file on the disk.
|
* Returns true if there is a valid database file on the disk.
|
||||||
*/
|
*/
|
||||||
|
G_GNUC_PURE
|
||||||
static inline bool
|
static inline bool
|
||||||
db_exists(void)
|
db_exists(void)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user