[vala/0.40] ccode: Fix typo and actually check "end_decls"



commit 1505c6010e1bcf6c80a64700dfe41829261c7b2f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Oct 9 08:28:33 2018 +0200

    ccode: Fix typo and actually check "end_decls"
    
    Note both begin_decls and end_decls must be either not null or null.
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/672

 ccode/valaccodefile.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/ccode/valaccodefile.vala b/ccode/valaccodefile.vala
index aa5be219e..e98d84bd0 100644
--- a/ccode/valaccodefile.vala
+++ b/ccode/valaccodefile.vala
@@ -181,7 +181,7 @@ public class Vala.CCodeFile {
                        once.append (constant_declaration);
                        once.append (new CCodeNewline ());
 
-                       if (begin_decls != null) {
+                       if (end_decls != null) {
                                once.append (new CCodeIdentifier (end_decls));
                                once.append (new CCodeNewline ());
                        }


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