diff options
author | Evan Nemerson <evan@coeus-group.com> | 2014-01-28 21:56:03 -0800 |
---|---|---|
committer | Evan Nemerson <evan@coeus-group.com> | 2014-01-28 21:56:03 -0800 |
commit | 994dd5674637dfe577408f486216728addbae8e5 (patch) | |
tree | 75cbffe63856c1757e4c01e277e0c40f32247430 | |
parent | a4b869a6c5dd7763748acdca837149e924d02385 (diff) | |
download | vala-994dd5674637dfe577408f486216728addbae8e5.tar.gz |
glib-2.0: fix qsort_with_data binding
Fixes bug 640786.
-rw-r--r-- | vapi/glib-2.0.vapi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index e2ab16b9a..2e0096aa5 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -4913,8 +4913,15 @@ namespace GLib { [CCode (cname = "G_STATIC_ASSERT", cheader_filename = "glib.h")] public static void static_assert (bool expression); - [CCode (simple_generics = true)] - private static void qsort_with_data<T> (T[] elems, size_t size, [CCode (type = "GCompareDataFunc")] GLib.CompareDataFunc<T> compare_func); + [CCode (simple_generics = true, cname = "g_qsort_with_data")] + private static void _qsort_with_data<T> (T[] elems, size_t size, [CCode (type = "GCompareDataFunc")] GLib.CompareDataFunc<T> compare_func); + + [CCode (cname = "_vala_g_qsort_with_data")] + public static void qsort_with_data<T> (T[] elems, size_t size, [CCode (type = "GCompareDataFunc")] GLib.CompareDataFunc<T> compare_func) { + _qsort_with_data<T*> (elems, size, (a, b) => { + return compare_func (*a, *b); + }); + } /* Unix-specific functions. All of these have to include glib-unix.h. */ namespace Unix { |