Mercurial > pidgin.yaz
diff libpurple/protocols/msn/user.h @ 29350:99d1b433dba0
Keep CurrentMedia in a separate object outside of MsnUser that needs to
be allocated if a user has media. This makes MsnUser smaller by the
size of 3 pointers (apparently) for each buddy in your buddy list.
In practice it looks like less than 1% of MSN users have media set,
so this should save a little bit of memory.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 04 Feb 2010 00:15:41 +0000 |
parents | 452043d200f0 |
children | 08296b862f98 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/user.h Wed Feb 03 22:48:03 2010 +0000 +++ b/libpurple/protocols/msn/user.h Thu Feb 04 00:15:41 2010 +0000 @@ -75,7 +75,7 @@ const char *status; /**< The state of the user. */ char *statusline; /**< The state of the user. */ - CurrentMedia media; /**< Current media of the user. */ + CurrentMedia *media; /**< Current media of the user. */ gboolean idle; /**< The idle state of the user. */ @@ -158,9 +158,10 @@ * Sets the current media of user. * * @param user The user. - * @param cmedia Current media. + * @param cmedia Current media. This function takes ownership of this + * object and its contents. */ -void msn_user_set_currentmedia(MsnUser *user, const CurrentMedia *cmedia); +void msn_user_set_currentmedia(MsnUser *user, CurrentMedia *cmedia); /** * Sets the new state of user.