[Vala] Functions with no_array_length



Dear Vala users,

I am trying to wrap an external library in which a function returns an
arrays whose size can be obtained by another function. Yet, I have been
unsuccessful in finding how to do so. Here is a simple testcase:

% cat package.vala
namespace Package {
    [CCode (no_array_length=true)]
    public int[] func();
}

% cat main.vala
using Package;

int main (string[] argv) {
    var res = Package.func ();
    return res[0];
}

Yet, the generated C code contains:

        res = (_tmp1_ = package_func (&_tmp0_), res_length1 = _tmp0_,
_res_size_ = res_length1, _tmp1_);

Shouldn't no_array_length removes this tmp0 parameter addition?

Thanks a lot for your answers.

Best regards,

--
Neil Dökkalfar




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