mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
event: Use an inline function instead of a macro for gst_event_replace()
This gives us type checks by the compiler and more useful compiler errors.
This commit is contained in:
parent
cdd3c303f1
commit
ef32fd0d15
1 changed files with 9 additions and 2 deletions
|
@ -239,8 +239,15 @@ typedef struct _GstEventClass GstEventClass;
|
||||||
*
|
*
|
||||||
* Since: 0.10.3
|
* Since: 0.10.3
|
||||||
*/
|
*/
|
||||||
#define gst_event_replace(old_event,new_event) \
|
#ifdef _FOOL_GTK_DOC_
|
||||||
gst_mini_object_replace ((GstMiniObject **)(old_event), GST_MINI_OBJECT_CAST (new_event))
|
G_INLINE_FUNC void gst_event_replace (GstEvent **old_event, GstEvent *new_event);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
gst_event_replace (GstEvent **old_event, GstEvent *new_event)
|
||||||
|
{
|
||||||
|
gst_mini_object_replace ((GstMiniObject **) old_event, (GstMiniObject *) new_event);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstSeekType:
|
* GstSeekType:
|
||||||
|
|
Loading…
Reference in a new issue