>> If you just need to store a signed integer as the value of an entry in
>> the hash table, you can better use GINT_TO_POINTER (integer) and
>> GPOINTER_TO_INT (pointer), instead of packing the integer into a GValue.
>
> I need it in a format that DBus will be okay with -- NetworkTimezone
> is d
On Sat, Jan 21, 2012 at 04:58, Aleksander Morgado wrote:
> If you just need to store a signed integer as the value of an entry in
> the hash table, you can better use GINT_TO_POINTER (integer) and
> GPOINTER_TO_INT (pointer), instead of packing the integer into a GValue.
I need it in a format tha
>
> +static GValue *
> +int_to_gvalue (gint i)
> +{
> +GValue *v = g_slice_new0 (GValue);
> +g_value_init (v, G_TYPE_INT);
> +g_value_set_int (v, i);
> +return v;
> +}
> +
> +static void
> +value_destroy (gpointer data)
> +{
> +GValue *v = (GValue *) data;
> +g_value_unse
Signed-off-by: Thomas Tuttle
---
src/mm-modem-base.c | 103 ++-
src/mm-modem-base.h |4 ++
src/mm-modem.h |3 +-
3 files changed, 108 insertions(+), 2 deletions(-)
diff --git a/src/mm-modem-base.c b/src/mm-modem-base.c
index 372367a..