[vala/staging] 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/staging] glib-2.0: Add missing "type_id" or "has_type_id" attributes to structs
- Date: Sun, 8 Mar 2020 17:15:39 +0000 (UTC)
commit 8797a0db0c907f718ad4691552d5b16f2620cad9
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 be4b2c19d..d96f4876d 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -1630,7 +1630,7 @@ private const int EINVAL;
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 {
}
@@ -1983,6 +1983,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;
@@ -2069,6 +2070,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;
@@ -2146,7 +2148,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 ();
@@ -2164,7 +2166,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 ();
@@ -2182,7 +2184,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 ();
@@ -2212,7 +2214,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 ();
@@ -2222,7 +2224,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 ();
@@ -2232,7 +2234,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 ();
@@ -2252,7 +2254,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 ();
@@ -2261,7 +2263,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 ();
@@ -2277,7 +2279,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);
@@ -2782,6 +2784,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")]
@@ -3438,6 +3441,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;
@@ -3504,6 +3508,7 @@ namespace GLib {
LAST
}
+ [CCode (has_type_id = false)]
[SimpleType]
public struct TokenValue {
[CCode (cname="v_symbol")]
@@ -3818,7 +3823,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 */
@@ -3870,7 +3875,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;
@@ -4044,6 +4049,7 @@ namespace GLib {
NOALIAS
}
+ [CCode (has_type_id = false)]
public struct OptionEntry {
public unowned string long_name;
public char short_name;
@@ -4292,6 +4298,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;
@@ -5026,6 +5033,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);
@@ -5057,7 +5065,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 () {
@@ -5430,7 +5438,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]