[vala] glib-2.0: fix GenericArray.sort* bindings
- From: Evan Nemerson <evann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] glib-2.0: fix GenericArray.sort* bindings
- Date: Thu, 22 Sep 2011 23:09:14 +0000 (UTC)
commit a1f8b58487327ed95297553793dd151b3b062ed4
Author: Evan Nemerson <evan coeus-group com>
Date: Sun Sep 18 10:09:03 2011 -0700
glib-2.0: fix GenericArray.sort* bindings
vapi/glib-2.0.vapi | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 2a4d2b3..8c46141 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -4041,8 +4041,20 @@ namespace GLib {
this.add ((owned) data);
this.remove_index_fast (index);
}
- public void sort (GLib.CompareFunc<G> compare_func);
- public void sort_with_data (GLib.CompareDataFunc<G> compare_func);
+ [CCode (cname = "vala_g_ptr_array_sort")]
+ public void sort (GLib.CompareFunc<G> compare_func) {
+ this._sort_with_data ((a, b) => {
+ return compare_func ((G**) (*a), (G**) (*b));
+ });
+ }
+ [CCode (cname = "g_ptr_array_sort_with_data")]
+ public void _sort_with_data (GLib.CompareDataFunc<G**> compare_func);
+ [CCode (cname = "vala_g_ptr_array_sort_with_data")]
+ public void sort_with_data (GLib.CompareDataFunc<G> compare_func) {
+ this._sort_with_data ((a, b) => {
+ return compare_func ((G**) (*a), (G**) (*b));
+ });
+ }
private void set_size (int length);
public int length {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]