[vala/0.36: 162/212] girparser: Ignore conflicting closure/destroy indexes
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36: 162/212] girparser: Ignore conflicting closure/destroy indexes
- Date: Sat, 14 Apr 2018 07:56:58 +0000 (UTC)
commit 208a2e9076df65efe75a2023dd5615ddbccd2558
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 b71664c..23bd4e3 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -3242,13 +3242,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]