Variant: Add wrapper for g_variant_print()
This commit is contained in:
parent
bc40506cab
commit
c1fbe27b32
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue