replay_gain: added function replay_gain_info_dup()

This commit is contained in:
Max Kellermann 2010-01-03 22:54:25 +01:00
parent 604ca50b65
commit e58b4f773f
2 changed files with 12 additions and 0 deletions

View File

@ -162,6 +162,12 @@ struct replay_gain_info *replay_gain_info_new(void)
return ret;
}
struct replay_gain_info *
replay_gain_info_dup(const struct replay_gain_info *src)
{
return g_memdup(src, sizeof(*src));
}
void replay_gain_info_free(struct replay_gain_info *info)
{
g_free(info);

View File

@ -50,6 +50,12 @@ struct replay_gain_info {
struct replay_gain_info *
replay_gain_info_new(void);
/**
* Duplicate a #replay_gain_info object.
*/
struct replay_gain_info *
replay_gain_info_dup(const struct replay_gain_info *src);
void replay_gain_info_free(struct replay_gain_info *info);
void replay_gain_global_init(void);