Re: copy GVariant
- From: Chris Vine <chris cvine freeserve co uk>
- To: Povietkin Konstantin <povetkin k gmail com>
- Cc: Murray Cumming <murrayc murrayc com>, GTKMM-List <gtkmm-list gnome org>
- Subject: Re: copy GVariant
- Date: Tue, 8 Feb 2011 02:34:11 +0000
On Mon, 07 Feb 2011 23:07:28 +0200
Povietkin Konstantin <povetkin k gmail com> wrote:
> I asked this question because i needed a c++ class that was using
> GVariant c-object.
> My solution is simple:
>
> GVariant * first;
> GVariant * second;
>
> first = g_variant_new_string( "Тестовая строка" );
>
> second = g_variant_new_parsed( g_variant_print( first, TRUE ) );
If you are programming in unwrapped glib, the normal thing would be to
copy the pointer and increment the reference count.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]