Re: [MM] [PATCH] sms: use g_variant_new_from_data instead of g_variant_new_fixed_array



> It wasn't that simple at the end :-)
>
> Just for reference, g_variant_new_from_data() will actually use the
> original array passed as input during its operation; which means that
> the user of the method needs to make sure the input array is valid as
> long as the variant is valid. That can easily be done using the
> GDestroyNotify callback passed in g_variant_new_from_data(), like this:
>
>
> http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=ea87a4556e4f4d09d0c4eaa6d85a7efc85431328
>
> Cheers!
>
> --
> Aleksander

Thanks!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]