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:
Aleksander Morgado
2018-08-09 11:59:40 +02:00
committed by Dan Williams
parent 2773475f43
commit fe66bdf65e

View File

@@ -30,7 +30,7 @@ G_BEGIN_DECLS
*
* 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_SIGNAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIGNAL, MMSignal))