[Vala] Iterate in VAPI bindings
- From: Olivier Duchateau <duchateau olivier gmail com>
- To: vala-list gnome org
- Subject: [Vala] Iterate in VAPI bindings
- Date: Fri, 30 Dec 2016 15:24:26 +0100
Hi,
I'm trying to write Vala bindings for pkg(8), FreeBSD's packages manager. But I encounter weird behaviour in
while loop.
Currently I try to display name of repositories (FreeBSD and Xfce).
My simple C program [1] works fine (expected result). If I use same while loop in my Vala program, I get an
infinite loop. So I use for loop [2], but it's only FreeBSD which is displayed. I wonder how to iterate in
loop.
Traduction of related pkg_repo* methods is here [3], and corresponding C [4].
Regards,
[1] https://bitbucket.org/olivierduchateau/scripts/src/1f34246a6bc9/pkg/repos.c?at=default
[2] https://bitbucket.org/olivierduchateau/libpkg-vapi/src/cc552a344dac/test.vala?at=default
[3]
https://bitbucket.org/olivierduchateau/libpkg-vapi/src/cc552a344dac/pkg.vapi?at=default&fileviewer=file-view-default#pkg.vapi-146
[4] https://github.com/freebsd/pkg/blob/1.9.4/libpkg/pkg.h.in#L1501
--
olivier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]