Re: [Vala] ArrayList sort function

2008-11-24 Thread Quikee
In my opinion this sort method should be supported the array in the same way as move() and resize() are supported and ArrayList should use that implementation. In this way you just sort an array like: string[] abc = {"c", "a", "b"}; abc.sort(Glib.strcmp); Should be easily added for someone who k

Re: [Vala] ArrayList sort function

2008-11-21 Thread Daniel Lucraft
I cleaned up the comparison functions a bit after playing with Vala pointers and begging on IRC. best Dan ___ Daniel Lucraft http://www.daniellucraft.com/ 2008/11/21 Daniel Lucraft <[EMAIL PROTECTED]>: > As requested on IRC, here are two patches that add a sort method to

[Vala] ArrayList sort function

2008-11-21 Thread Daniel Lucraft
As requested on IRC, here are two patches that add a sort method to ArrayList. Some notes: 1. I wasn't sure where to put the vapi binding to the C stdlib function qsort. But I saw that glib.vapi had the reference to the strcmp function so I put it next to that. 2. There are two comparison fu