gst/gstbuffer.h: Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related type-punned pointer warnings.

Original commit message from CVS:
* gst/gstbuffer.h:
Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related
type-punned pointer warnings.
This commit is contained in:
Tim-Philipp Müller 2006-10-17 10:30:27 +00:00
parent 854bc55a2e
commit c64c4fd000
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2006-10-17 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstbuffer.h:
Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related
type-punned pointer warnings.
2006-10-16 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstelement.h:

View file

@ -376,7 +376,12 @@ GstBuffer* gst_buffer_make_metadata_writable (GstBuffer *buf);
*
* Either @nbuf or the #GstBuffer pointed to by @obuf may be NULL.
*/
#define gst_buffer_replace(obuf,nbuf) gst_mini_object_replace ((GstMiniObject **)(obuf), GST_MINI_OBJECT_CAST (nbuf))
#define gst_buffer_replace(obuf,nbuf) \
G_STMT_START { \
GstBuffer **___obufaddr = (obuf); \
gst_mini_object_replace ((GstMiniObject **)___obufaddr, \
GST_MINI_OBJECT_CAST (nbuf)); \
} G_STMT_END
GstCaps* gst_buffer_get_caps (GstBuffer *buffer);
void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps);