mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-13 19:44:10 +00:00
gst/gstregistrybinary.c: Wrap multi-line macros in G_STMT_{START|END}.
Original commit message from CVS: * gst/gstregistrybinary.c: (unpack_element), (unpack_const_string), (unpack_string):: Wrap multi-line macros in G_STMT_{START|END}.
This commit is contained in:
parent
9b65eb6838
commit
13089a438a
2 changed files with 15 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-12-27 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||
|
||||
* gst/gstregistrybinary.c: (unpack_element), (unpack_const_string),
|
||||
(unpack_string)::
|
||||
Wrap multi-line macros in G_STMT_{START|END}.
|
||||
|
||||
2008-12-20 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
|
|
|
@ -74,17 +74,20 @@
|
|||
|
||||
/* macros */
|
||||
|
||||
#define unpack_element(_inptr, _outptr, _element) \
|
||||
#define unpack_element(_inptr, _outptr, _element) G_STMT_START{ \
|
||||
_outptr = (_element *) _inptr; \
|
||||
_inptr += sizeof (_element)
|
||||
_inptr += sizeof (_element); \
|
||||
}G_STMT_END
|
||||
|
||||
#define unpack_const_string(_inptr, _outptr) \
|
||||
#define unpack_const_string(_inptr, _outptr) G_STMT_START{\
|
||||
_outptr = g_intern_string ((const gchar *)_inptr); \
|
||||
_inptr += strlen(_outptr) + 1
|
||||
_inptr += strlen(_outptr) + 1; \
|
||||
}G_STMT_END
|
||||
|
||||
#define unpack_string(_inptr, _outptr) \
|
||||
#define unpack_string(_inptr, _outptr) G_STMT_START{\
|
||||
_outptr = g_strdup ((gchar *)_inptr); \
|
||||
_inptr += strlen(_outptr) + 1
|
||||
_inptr += strlen(_outptr) + 1; \
|
||||
}G_STMT_END
|
||||
|
||||
#define ALIGNMENT (sizeof (void *))
|
||||
#define alignment(_address) (gsize)_address%ALIGNMENT
|
||||
|
|
Loading…
Reference in a new issue