vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Sat Aug 20 22:36:07 2011 +0300| [b17eb18e9cb1917472047daf9bcafac93af90715] | committer: Rémi Denis-Courmont
Move msg_Copy() and msg_Free() to ncurses > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b17eb18e9cb1917472047daf9bcafac93af90715 --- include/vlc_messages.h | 21 --------------------- modules/gui/ncurses.c | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/include/vlc_messages.h b/include/vlc_messages.h index 7e02df3..cb7c7f3 100644 --- a/include/vlc_messages.h +++ b/include/vlc_messages.h @@ -64,27 +64,6 @@ typedef struct char *psz_msg; /**< Message text */ } msg_item_t; -VLC_MALLOC VLC_USED -static inline msg_item_t *msg_Copy (const msg_item_t *msg) -{ - msg_item_t *copy = (msg_item_t *)xmalloc (sizeof (*copy)); - copy->i_type = msg->i_type; - copy->i_object_id = msg->i_object_id; - copy->psz_object_type = msg->psz_object_type; - copy->psz_module = strdup (msg->psz_module); - copy->psz_msg = strdup (msg->psz_msg); - copy->psz_header = msg->psz_header ? strdup (msg->psz_header) : NULL; - return copy; -} - -static inline void msg_Free (msg_item_t *msg) -{ - free ((char *)msg->psz_module); - free ((char *)msg->psz_header); - free (msg->psz_msg); - free (msg); -} - /** * Used by interface plugins which subscribe to the message bank. */ diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c index c712574..e6f55b8 100644 --- a/modules/gui/ncurses.c +++ b/modules/gui/ncurses.c @@ -1810,6 +1810,25 @@ static void HandleKey(intf_thread_t *p_intf) /* * */ +static msg_item_t *msg_Copy (const msg_item_t *msg) +{ + msg_item_t *copy = (msg_item_t *)xmalloc (sizeof (*copy)); + copy->i_type = msg->i_type; + copy->i_object_id = msg->i_object_id; + copy->psz_object_type = msg->psz_object_type; + copy->psz_module = strdup (msg->psz_module); + copy->psz_msg = strdup (msg->psz_msg); + copy->psz_header = msg->psz_header ? strdup (msg->psz_header) : NULL; + return copy; +} + +static void msg_Free (msg_item_t *msg) +{ + free ((char *)msg->psz_module); + free ((char *)msg->psz_header); + free (msg->psz_msg); + free (msg); +} static void MsgCallback(void *data, const msg_item_t *msg) { _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits