[vala/staging] girparser: Ignore conflicting closure/destroy indexes
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Ignore conflicting closure/destroy indexes
- Date: Mon, 29 Jan 2018 20:30:54 +0000 (UTC)
commit 3504dc119cfa040c42efad8672199205d11dcecb
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Jan 28 23:00:03 2018 +0100
girparser: Ignore conflicting closure/destroy indexes
Reverse references from closure/destroy parameters back to the callback
break our later logic, so skip this additional information.
vala/valagirparser.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 2c94e24..617aaf0 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -3262,13 +3262,17 @@ public class Vala.GirParser : CodeVisitor {
if (instance_idx > -2 && instance_idx < closure_idx) {
closure_idx--;
}
- current.closure_parameters.add (closure_idx);
+ if (current.closure_parameters.index_of (current_parameter_idx) < 0) {
+ current.closure_parameters.add (closure_idx);
+ }
}
if (destroy_idx != -1) {
if (instance_idx > -2 && instance_idx < destroy_idx) {
destroy_idx--;
}
- current.destroy_parameters.add (destroy_idx);
+ if (current.destroy_parameters.index_of (current_parameter_idx) < 0) {
+ current.destroy_parameters.add (destroy_idx);
+ }
}
if (param_comment != null) {
if (comment == null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]