[vlc-devel] commit: events: Add wrappers around vlc_event_manager_init for object casting. (Pierre d' Herbemont )
git version control
git at videolan.org
Sat Jun 14 15:16:59 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Jun 14 12:19:05 2008 +0200| [a779588f7212b9d6f34b61dfcb457b31d0153f3a]
events: Add wrappers around vlc_event_manager_init for object casting.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a779588f7212b9d6f34b61dfcb457b31d0153f3a
---
include/vlc_events.h | 7 ++++++-
src/libvlccore.sym | 2 +-
src/misc/events.c | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/include/vlc_events.h b/include/vlc_events.h
index 50c4105..01baa94 100644
--- a/include/vlc_events.h
+++ b/include/vlc_events.h
@@ -184,7 +184,12 @@ typedef void ( *vlc_event_callback_t )( const vlc_event_t *, void * );
* which events are sent
* p_obj is here to give us a libvlc instance
*/
-VLC_EXPORT(int, vlc_event_manager_init, ( vlc_event_manager_t * p_em,
+#define vlc_event_manager_init_with_vlc_object(a,b) \
+ vlc_event_manager_init( a, b, b )
+
+#define vlc_event_manager_init(a,b,c) \
+ __vlc_event_manager_init(a, b, VLC_OBJECT(c))
+VLC_EXPORT(int, __vlc_event_manager_init, ( vlc_event_manager_t * p_em,
void * p_obj, vlc_object_t * ));
/*
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index f0b8828..f5cfcd5 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -406,7 +406,7 @@ vlc_error
__vlc_event_attach
vlc_event_detach
vlc_event_manager_fini
-vlc_event_manager_init
+__vlc_event_manager_init
vlc_event_manager_register_event_type
vlc_event_send
__vlc_execve
diff --git a/src/misc/events.c b/src/misc/events.c
index 60bc130..3b539cc 100644
--- a/src/misc/events.c
+++ b/src/misc/events.c
@@ -110,8 +110,8 @@ group_contains_listener( vlc_event_listeners_group_t * group,
* for instance).
* p_parent_obj gives a libvlc instance
*/
-int vlc_event_manager_init( vlc_event_manager_t * p_em, void * p_obj,
- vlc_object_t * p_parent_obj )
+int __vlc_event_manager_init( vlc_event_manager_t * p_em, void * p_obj,
+ vlc_object_t * p_parent_obj )
{
p_em->p_obj = p_obj;
p_em->p_parent_object = p_parent_obj;
More information about the vlc-devel
mailing list