[vala] Add bindings to GLib.Once
- From: Maciej Marcin Piechotka <mpiechotka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Add bindings to GLib.Once
- Date: Thu, 18 Apr 2013 10:12:37 +0000 (UTC)
commit f5a54052d1f7fb263bb8363934fabdc845f3a934
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date: Tue Apr 16 13:53:13 2013 +0200
Add bindings to GLib.Once
vapi/glib-2.0.vapi | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index ab686c5..163ffbb 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -1813,7 +1813,18 @@ namespace GLib {
public bool timed_wait (Mutex mutex, TimeVal abs_time);
public bool wait_until (Mutex mutex, int64 end_time);
}
-
+
+ [CCode (cname = "GThreadFunc")]
+ public delegate G OnceFunc<G> ();
+
+ [CCode (default_value = "G_ONCE_INIT")]
+ public struct Once<G> {
+ [CCode (cname = "g_once")]
+ public unowned G once (OnceFunc<G> function);
+ public static bool init_enter ([CCode (ctype="volatile gsize *")] size_t *value);
+ public static void init_leave ([CCode (ctype="volatile gsize *")] size_t *value, size_t
set_value);
+ }
+
/* Thread Pools */
[CCode (cname = "GFunc")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]