Variant: Add wrapper for g_variant_print()

This commit is contained in:
Xavier Claessens 2014-05-15 15:51:32 -04:00
parent bc40506cab
commit c1fbe27b32

View file

@ -194,5 +194,14 @@ namespace GLib {
IntPtr str = g_variant_get_string (val.Handle);
return str == IntPtr.Zero ? null : GLib.Marshaller.Utf8PtrToString (str);
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_print (IntPtr variant, bool type_annotate);
public string Print (bool type_annotate)
{
IntPtr str = g_variant_print(handle, type_annotate);
return Marshaller.PtrToStringGFree (str);
}
}
}