[vala] girwriter: Don't emit scope async and notified at the same time



commit e5608074cc3cc145cc028af73387aa4bbab63a19
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu Jun 13 20:16:25 2013 +0200

    girwriter: Don't emit scope async and notified at the same time
    
    Fixes bug 702180

 codegen/valagirwriter.vala |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 073dd8a..01e94db 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -1214,12 +1214,10 @@ public class Vala.GIRWriter : CodeVisitor {
                        int closure_index = is_parameter ?
                                index + 1 : (type.value_owned ? index - 1 : index);
                        buffer.append_printf (" closure=\"%i\"", closure_index);
-                       if (type.value_owned) {
-                               buffer.append_printf (" scope=\"notified\" destroy=\"%i\"", closure_index + 
1);
-                       }
-
                        if (delegate_type.is_called_once) {
                                buffer.append (" scope=\"async\"");
+                       } else if (type.value_owned) {
+                               buffer.append_printf (" scope=\"notified\" destroy=\"%i\"", closure_index + 
1);
                        }
                }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]