Re: [Vala] Foreach with lambda: C error
- From: Marco Trevisan (Treviño) <mail 3v1n0 net>
- To: vala-list gnome org
- Subject: Re: [Vala] Foreach with lambda: C error
- Date: Tue, 26 Oct 2010 20:24:03 +0200
Il giorno mar, 19/10/2010 alle 19.44 +0200, Jürg Billeter ha scritto:
On Tue, 2010-10-19 at 19:32 +0200, Marco Trevisan (Treviño) wrote:
I'm trying to use a lambda function as a foreach body for an HashTable:
public void print_hashmap(GLib.HashTable<string,GLib.Value?> map) {
// ....
map.foreach((k, v) => {
string key = (string)k;
Value val = (Value)v;
v is of type `Value?` and not just `Value`.
We should try to switch to generic delegate for HFunc to avoid the
necessity of such casts.
Has this fixed in 837258146130818b9d02aba9ec63d586c611544d ?
Thanks!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]