[vala/0.14] codegen: Fix is_reference_counting() result for interfaces



commit 210e05b84183cd2594d2b0d1230e0db74facdfa1
Author: Luca Bruno <lucabru src gnome org>
Date:   Fri Oct 14 20:21:42 2011 +0200

    codegen: Fix is_reference_counting() result for interfaces
    
    Fixes a regression introduced by commit 5956bf5074d4508c.
    
    Fixes bug 661620.

 codegen/valaccodebasemodule.vala |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index a21c4d4..41c0c52 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5580,7 +5580,13 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 	}
 
 	public static bool is_reference_counting (TypeSymbol sym) {
-		return get_ccode_ref_function (sym) != null;
+		if (sym is Class) {
+			return get_ccode_ref_function (sym) != null;
+		} else if (sym is Interface) {
+			return true;
+		} else {
+			return false;
+		}
 	}
 
 	public static bool get_ccode_ref_function_void (Class cl) {



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