mirror of
				https://github.com/Ryujinx/GtkSharp.git
				synced 2025-11-04 08:24:56 +00:00 
			
		
		
		
	Variant: Add wrapper for g_variant_print()
This commit is contained in:
		
							parent
							
								
									bc40506cab
								
							
						
					
					
						commit
						c1fbe27b32
					
				| 
						 | 
				
			
			@ -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