[vala] girparser: Fix callback parameters with destroy_notify
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Fix callback parameters with destroy_notify
- Date: Tue, 29 Jun 2010 19:23:55 +0000 (UTC)
commit 03f7ebcba06e959c219aa0e1f2f8c439ca4cad56
Author: Jürg Billeter <j bitron ch>
Date: Tue Jun 29 21:08:07 2010 +0200
girparser: Fix callback parameters with destroy_notify
vala/valagirparser.vala | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 4d051a3..5177899 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -400,7 +400,7 @@ public class Vala.GirParser : CodeVisitor {
end_element ("varargs");
} else {
var type = parse_type (null, out array_length_idx, transfer == "full");
- if (transfer == "full" || transfer == "container") {
+ if (transfer == "full" || transfer == "container" || destroy != null) {
type.value_owned = true;
}
if (allow_none == "1") {
@@ -1005,15 +1005,13 @@ public class Vala.GirParser : CodeVisitor {
}
info.param.cdelegate_target_parameter_position = parameters[info.closure_idx - add].vala_idx;
}
-/* Leaving this as a TODO, needs more testing
if (info.destroy_idx != -1) {
if (info.destroy_idx - add >= parameters.size) {
Report.error (get_current_src (), "invalid destroy index");
continue;
}
- info.param.cdelegate_target_parameter_position = parameters[info.destroy_idx - add].vala_idx;
+ info.param.cdestroy_notify_parameter_position = parameters[info.destroy_idx - add].vala_idx;
}
-*/
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]