gst/gstelement.h: Add casts to the correct return type to state <=> state transition macros.

Original commit message from CVS:
* gst/gstelement.h:
Add casts to the correct return type to state <=> state transition
macros.
This commit is contained in:
Tim-Philipp Müller 2006-10-16 20:02:38 +00:00
parent 272e7dc8bd
commit 854bc55a2e
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2006-10-16 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstelement.h:
Add casts to the correct return type to state <=> state transition
macros.
2006-10-16 Stefan Kost <ensonic@users.sf.net>
* docs/design/part-live-source.txt:

View file

@ -145,21 +145,21 @@ typedef enum {
* Given a current state @cur and a next state @next, calculate the associated
* #GstStateChange transition.
*/
#define GST_STATE_TRANSITION(cur,next) (((cur)<<3)|(next))
#define GST_STATE_TRANSITION(cur,next) ((GstStateChange)(((cur)<<3)|(next)))
/**
* GST_STATE_TRANSITION_CURRENT:
* @trans: A #GstStateChange
*
* Given a state transition @trans, extract the current #GstState.
*/
#define GST_STATE_TRANSITION_CURRENT(trans) ((trans)>>3)
#define GST_STATE_TRANSITION_CURRENT(trans) ((GstState)((trans)>>3))
/**
* GST_STATE_TRANSITION_NEXT:
* @trans: A #GstStateChange
*
* Given a state transition @trans, extract the next #GstState.
*/
#define GST_STATE_TRANSITION_NEXT(trans) ((trans)&0x7)
#define GST_STATE_TRANSITION_NEXT(trans) ((GstState)((trans)&0x7))
/**
* GstStateChange: