Compiler.h: add gcc_returns_nonnull, gcc_returns_twice

This commit is contained in:
Max Kellermann
2017-12-18 23:00:13 +01:00
parent 5582367d68
commit edee8a3446
12 changed files with 27 additions and 23 deletions

View File

@@ -106,7 +106,7 @@ public:
/**
* Create a new root #Directory object.
*/
gcc_malloc
gcc_malloc gcc_returns_nonnull
static Directory *NewRoot() {
return new Directory(std::string(), nullptr);
}

View File

@@ -95,11 +95,11 @@ struct Song {
Song(const char *_uri, size_t uri_length, Directory &parent);
~Song();
gcc_malloc
gcc_malloc gcc_returns_nonnull
static Song *NewFrom(DetachedSong &&other, Directory &parent);
/** allocate a new song with a local file name */
gcc_malloc
gcc_malloc gcc_returns_nonnull
static Song *NewFile(const char *path_utf8, Directory &parent);
/**