libmm-glib,signal: fix MM_SIGNAL_UNKNOWN symbol value
Unfortunately, G_MINDOUBLE is basically 0.0, so MM_SIGNAL_UNKNOWN ends up giving us a value that may fall in the range of expected values for the signal component. Update the MM_SIGNAL_UNKNOWN symbol to match a value which is definitely out any other possible valid range, so that we can easily detect which values are set and which aren't. While API is maintained, this fix is introducing an ABI break. Not a big deal anyway, as the purpose of the value is just to detect unset fields.
This commit is contained in:

committed by
Dan Williams

parent
2773475f43
commit
fe66bdf65e
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
|
|||||||
*
|
*
|
||||||
* Identifier for an unknown signal value.
|
* Identifier for an unknown signal value.
|
||||||
*/
|
*/
|
||||||
#define MM_SIGNAL_UNKNOWN G_MINDOUBLE
|
#define MM_SIGNAL_UNKNOWN -G_MAXDOUBLE
|
||||||
|
|
||||||
#define MM_TYPE_SIGNAL (mm_signal_get_type ())
|
#define MM_TYPE_SIGNAL (mm_signal_get_type ())
|
||||||
#define MM_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIGNAL, MMSignal))
|
#define MM_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIGNAL, MMSignal))
|
||||||
|
Reference in New Issue
Block a user