[Vala] Posix.qsort no longer works



Vala version: 0.7.10

Problem:
========
Posix.qsort (an_array, an_array.length, sizeof_array_element, cmp);

is compiled to:

qsort(.... 5 arguments, the last of which is cmp_target ....)

This didn't happen with version 0.7.8.

Musing:
=======
'*_target' must have been introduced to support some new feature
which unfortunately tramples badly here.

Workarounds that don't work:
============================
1. cmp is a class method (static)
2. cmp is an object method (non-static)
3. cmp is a variable, as in:
     Posix.compar_fn_t cmp = (m1, m2) => {return ....}
4. inline, as in:
     Posix.qsort (an_array, an_array.length, sizeof_array_element,
        (m1, m2) => {return ...})

Work around that works:
=======================
Please, help me with one.


Nice day
Nor Jaidi Tuah





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]