]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
WIP glib-2.0: Don't use generics for GLib.LogField
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 10 Apr 2023 20:39:06 +0000 (22:39 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 17 Apr 2023 19:02:04 +0000 (21:02 +0200)
vapi/glib-2.0.vapi

index d3b66babb973afb066ea3edd4a8a016eb2c31b48..96b1f0281b79761c769b7c0b780110867d1530cf 100644 (file)
@@ -2836,12 +2836,17 @@ namespace GLib {
                UNHANDLED
        }
 
-       [CCode (has_type_id = false, simple_generics = true)]
+       [CCode (has_type_id = false)]
        [Version (since = "2.50")]
-       public struct LogField<T> {
+       public struct LogField {
                public unowned string key;
-               public unowned T @value;
-               public ssize_t length;
+               [CCode (array_length_cname = "length", array_length_type = "gssize")]
+               public unowned uint8[] @value;
+               [CCode (cname = "vala_g_log_field_get_value_as_string")]
+               public unowned string get_value_as_string () {
+                       assert (@value.length < 0);
+                       return (string) @value;
+               }
        }
 
        public void logv (string? log_domain, LogLevelFlags log_level, string format, va_list args);