diff options
author | Max Kellermann <max@duempel.org> | 2008-09-15 13:27:33 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-15 13:27:33 +0200 |
commit | 3ef31f6e0c13aa7b2ebd1fcacd7e1aa3ac560ba5 (patch) | |
tree | 030fa5ddb7b619d841db4daa2319c15712420778 /src/str_pool.h | |
parent | 5f844850f75932d43c3a8bf03d0821bd438295bc (diff) | |
download | mpd-3ef31f6e0c13aa7b2ebd1fcacd7e1aa3ac560ba5.tar.gz mpd-3ef31f6e0c13aa7b2ebd1fcacd7e1aa3ac560ba5.tar.xz mpd-3ef31f6e0c13aa7b2ebd1fcacd7e1aa3ac560ba5.zip |
manage tag string allocations in a pool
There are many duplicated strings in the tag database, e.g. many songs
having the same artist. Don't allocate such strings twice, manage all
strings in a pool.
Diffstat (limited to '')
-rw-r--r-- | src/str_pool.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/str_pool.h b/src/str_pool.h new file mode 100644 index 000000000..4a0ad12d8 --- /dev/null +++ b/src/str_pool.h @@ -0,0 +1,28 @@ +/* ncmpc + * Copyright (C) 2008 Max Kellermann <max@duempel.org> + * This project's homepage is: http://www.musicpd.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef STR_POOL_H +#define STR_POOL_H + +char *str_pool_get(const char *value); + +char *str_pool_dup(char *value); + +void str_pool_put(char *value); + +#endif |