mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
pluginutils: add G_PRIMITIVE_SWAP() helper macro.
This macro helps swapping variables while maintaining the correct underlying and primitive type.
This commit is contained in:
parent
09724e12de
commit
bd397a536b
1 changed files with 6 additions and 0 deletions
|
@ -50,4 +50,10 @@ G_GNUC_INTERNAL
|
|||
gboolean
|
||||
gst_vaapi_append_surface_caps (GstCaps *out_caps, GstCaps *in_caps);
|
||||
|
||||
#ifndef G_PRIMITIVE_SWAP
|
||||
#define G_PRIMITIVE_SWAP(type, a, b) do { \
|
||||
const type t = a; a = b; b = t; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#endif /* GST_VAAPI_PLUGIN_UTIL_H */
|
||||
|
|
Loading…
Reference in a new issue