Commit 6a83721c authored by Max Kellermann's avatar Max Kellermann

directory: use gcc.h macros, not GLib

parent ca9795c3
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "check.h" #include "check.h"
#include "util/list.h" #include "util/list.h"
#include "gcc.h"
#ifdef __cplusplus #ifdef __cplusplus
#include "DatabaseVisitor.hxx" #include "DatabaseVisitor.hxx"
...@@ -114,14 +115,14 @@ isRootDirectory(const char *name) ...@@ -114,14 +115,14 @@ isRootDirectory(const char *name)
/** /**
* Generic constructor for #directory object. * Generic constructor for #directory object.
*/ */
G_GNUC_MALLOC gcc_malloc
struct directory * struct directory *
directory_new(const char *dirname, struct directory *parent); directory_new(const char *dirname, struct directory *parent);
/** /**
* Create a new root #directory object. * Create a new root #directory object.
*/ */
G_GNUC_MALLOC gcc_malloc
static inline struct directory * static inline struct directory *
directory_new_root(void) directory_new_root(void)
{ {
...@@ -170,14 +171,14 @@ directory_is_root(const struct directory *directory) ...@@ -170,14 +171,14 @@ directory_is_root(const struct directory *directory)
/** /**
* Returns the base name of the directory. * Returns the base name of the directory.
*/ */
G_GNUC_PURE gcc_pure
const char * const char *
directory_get_name(const struct directory *directory); directory_get_name(const struct directory *directory);
/** /**
* Caller must lock the #db_mutex. * Caller must lock the #db_mutex.
*/ */
G_GNUC_PURE gcc_pure
struct directory * struct directory *
directory_get_child(const struct directory *directory, const char *name); directory_get_child(const struct directory *directory, const char *name);
...@@ -189,7 +190,7 @@ directory_get_child(const struct directory *directory, const char *name); ...@@ -189,7 +190,7 @@ directory_get_child(const struct directory *directory, const char *name);
* @param parent the parent directory the new one will be added to * @param parent the parent directory the new one will be added to
* @param name_utf8 the UTF-8 encoded name of the new sub directory * @param name_utf8 the UTF-8 encoded name of the new sub directory
*/ */
G_GNUC_MALLOC gcc_malloc
struct directory * struct directory *
directory_new_child(struct directory *parent, const char *name_utf8); directory_new_child(struct directory *parent, const char *name_utf8);
...@@ -244,7 +245,7 @@ directory_remove_song(struct directory *directory, struct song *song); ...@@ -244,7 +245,7 @@ directory_remove_song(struct directory *directory, struct song *song);
* *
* Caller must lock the #db_mutex. * Caller must lock the #db_mutex.
*/ */
G_GNUC_PURE gcc_pure
struct song * struct song *
directory_get_song(const struct directory *directory, const char *name_utf8); directory_get_song(const struct directory *directory, const char *name_utf8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment