[vala/0.46] glib-2.0: Add missing "type_id" or "has_type_id" attributes to structs
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.46] glib-2.0: Add missing "type_id" or "has_type_id" attributes to structs
- Date: Tue, 24 Mar 2020 09:47:19 +0000 (UTC)
commit b2e7a25a2b4bf17b4b2d33e3d85f1cd41bc0223a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Mar 8 17:54:39 2020 +0100
glib-2.0: Add missing "type_id" or "has_type_id" attributes to structs
See https://gitlab.gnome.org/GNOME/vala/issues/921
vapi/glib-2.0.vapi | 36 ++++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 14 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 103f3065f..eeca863ed 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -1570,7 +1570,7 @@ public class string16 {
namespace GLib {
[PointerType]
[GIR (fullname = "gpointer")]
- [CCode (cname = "gpointer", const_cname = "gconstpointer", cheader_filename = "glib.h", default_value
= "NULL")]
+ [CCode (cname = "gpointer", const_cname = "gconstpointer", cheader_filename = "glib.h", default_value
= "NULL", type_id = "G_TYPE_POINTER")]
public struct pointer {
}
@@ -1911,6 +1911,7 @@ namespace GLib {
public static uint add_full (int priority, Pid pid, owned ChildWatchFunc function);
}
+ [CCode (type_id = "G_TYPE_POLLFD")]
public struct PollFD {
public int fd;
public IOCondition events;
@@ -1995,6 +1996,7 @@ namespace GLib {
[CCode (has_target = false)]
public delegate void SourceFinalizeFunc (Source source);
+ [CCode (has_type_id = false)]
public struct SourceFuncs {
public SourcePrepareFunc prepare;
public SourceCheckFunc check;
@@ -2072,7 +2074,7 @@ namespace GLib {
}
[Version (since = "2.32")]
- [CCode (destroy_function = "g_mutex_clear", lvalue_access = false)]
+ [CCode (destroy_function = "g_mutex_clear", has_type_id = false, lvalue_access = false)]
public struct Mutex {
public Mutex ();
public void @lock ();
@@ -2090,7 +2092,7 @@ namespace GLib {
}
[Version (since = "2.32")]
- [CCode (destroy_function = "g_rec_mutex_clear")]
+ [CCode (destroy_function = "g_rec_mutex_clear", has_type_id = false)]
public struct RecMutex {
public RecMutex ();
public void @lock ();
@@ -2108,7 +2110,7 @@ namespace GLib {
}
[Version (since = "2.32")]
- [CCode (destroy_function = "g_rw_lock_clear")]
+ [CCode (destroy_function = "g_rw_lock_clear", has_type_id = false)]
public struct RWLock {
public RWLock ();
public void writer_lock ();
@@ -2138,7 +2140,7 @@ namespace GLib {
}
[Version (deprecated_since = "2.32", replacement = "Mutex")]
- [CCode (destroy_function = "g_static_mutex_free", default_value = "G_STATIC_MUTEX_INIT")]
+ [CCode (destroy_function = "g_static_mutex_free", default_value = "G_STATIC_MUTEX_INIT", has_type_id
= false)]
public struct StaticMutex {
public StaticMutex ();
public void lock ();
@@ -2148,7 +2150,7 @@ namespace GLib {
}
[Version (deprecated_since = "2.32", replacement = "RecMutex")]
- [CCode (destroy_function = "g_static_rec_mutex_free", default_value = "G_STATIC_REC_MUTEX_INIT")]
+ [CCode (destroy_function = "g_static_rec_mutex_free", default_value = "G_STATIC_REC_MUTEX_INIT",
has_type_id = false)]
public struct StaticRecMutex {
public StaticRecMutex ();
public void lock ();
@@ -2158,7 +2160,7 @@ namespace GLib {
}
[Version (deprecated_since = "2.32", replacement = "RWLock")]
- [CCode (destroy_function = "g_static_rw_lock_free", default_value = "G_STATIC_RW_LOCK_INIT")]
+ [CCode (destroy_function = "g_static_rw_lock_free", default_value = "G_STATIC_RW_LOCK_INIT",
has_type_id = false)]
public struct StaticRWLock {
public StaticRWLock ();
public void reader_lock ();
@@ -2178,7 +2180,7 @@ namespace GLib {
public void replace (void* data);
}
- [CCode (destroy_function = "g_static_private_free", default_value = "G_STATIC_PRIVATE_INIT")]
+ [CCode (destroy_function = "g_static_private_free", default_value = "G_STATIC_PRIVATE_INIT",
has_type_id = false)]
[Version (deprecated_since = "2.32")]
public struct StaticPrivate {
public StaticPrivate ();
@@ -2187,7 +2189,7 @@ namespace GLib {
}
[Version (since = "2.32")]
- [CCode (destroy_function = "g_cond_clear", lvalue_access = false)]
+ [CCode (destroy_function = "g_cond_clear", has_type_id = false, lvalue_access = false)]
public struct Cond {
public Cond ();
public void @signal ();
@@ -2203,7 +2205,7 @@ namespace GLib {
public delegate G OnceFunc<G> ();
[Version (since = "2.4")]
- [CCode (default_value = "G_ONCE_INIT")]
+ [CCode (default_value = "G_ONCE_INIT", has_type_id = false)]
public struct Once<G> {
[CCode (cname = "g_once")]
public unowned G once (OnceFunc<G> function);
@@ -2704,6 +2706,7 @@ namespace GLib {
public static bool get_filename_charsets ([CCode (array_length = false, array_null_terminated =
true)] out unowned string[] charsets);
[SimpleType]
+ [CCode (has_type_id = false)]
public struct IConv {
public static IConv open (string to_codeset, string from_codeset);
[CCode (cname = "g_iconv")]
@@ -3341,6 +3344,7 @@ namespace GLib {
public void unexp_token (TokenType expected_token, string? identifier_spec, string?
symbol_spec, string? symbol_name, string? message, bool is_error);
}
+ [CCode (has_type_id = false)]
public struct ScannerConfig {
public string* cset_skip_characters;
public string* cset_identifier_first;
@@ -3407,6 +3411,7 @@ namespace GLib {
LAST
}
+ [CCode (has_type_id = false)]
[SimpleType]
public struct TokenValue {
[CCode (cname="v_symbol")]
@@ -3721,7 +3726,7 @@ namespace GLib {
}
}
- [CCode (cname = "struct utimbuf", cheader_filename = "sys/types.h,utime.h")]
+ [CCode (cname = "struct utimbuf", cheader_filename = "sys/types.h,utime.h", has_type_id = false)]
public struct UTimBuf {
time_t actime; /* access time */
time_t modtime; /* modification time */
@@ -3770,7 +3775,7 @@ namespace GLib {
public static bool close_checked (int fd) throws FileError;
}
- [CCode (cname = "GStatBuf", cheader_filename = "glib/gstdio.h")]
+ [CCode (cname = "GStatBuf", cheader_filename = "glib/gstdio.h", has_type_id = false)]
public struct Stat {
public time_t st_atime;
public time_t st_mtime;
@@ -3944,6 +3949,7 @@ namespace GLib {
NOALIAS
}
+ [CCode (has_type_id = false)]
public struct OptionEntry {
public unowned string long_name;
public char short_name;
@@ -4192,6 +4198,7 @@ namespace GLib {
[CCode (has_typedef = false)]
public delegate void MarkupParserErrorFunc (MarkupParseContext context, Error error);
+ [CCode (has_type_id = false)]
public struct MarkupParser {
[CCode (delegate_target = false)]
public unowned MarkupParserStartElementFunc start_element;
@@ -4926,6 +4933,7 @@ namespace GLib {
}
[Version (since = "2.16")]
+ [CCode (has_type_id = false)]
public struct HashTableIter<K,V> {
public HashTableIter (GLib.HashTable<K,V> table);
public bool next ([CCode (type = "gpointer*")] out unowned K key, [CCode (type =
"gpointer*")] out unowned V value);
@@ -4957,7 +4965,7 @@ namespace GLib {
}
[Version (since = "2.32")]
- [CCode (cname = "GHashTableIter", lower_case_cprefix = "g_hash_table_iter_")]
+ [CCode (cname = "GHashTableIter", lower_case_cprefix = "g_hash_table_iter_", has_type_id = false)]
public struct GenericSetIter<T> {
[CCode (cname = "_vala_hash_set_next_value")]
public unowned T? next_value () {
@@ -5324,7 +5332,7 @@ namespace GLib {
/* Keyed Data Lists */
- [CCode (cname = "GData*")]
+ [CCode (cname = "GData*", has_type_id = false)]
public struct Datalist<G> {
public Datalist ();
public void clear ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]