[vala] Do not add extra argument to unref functions



commit c3885bf7e7db0720fa884618e5d8f60ce3a6ef9d
Author: Evan Nemerson <evan coeus-group com>
Date:   Tue Apr 27 12:25:27 2010 -0700

    Do not add extra argument to unref functions
    
    Fixes bug 615481.

 codegen/valaccodebasemodule.vala |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index dc558c7..48d859f 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -2945,10 +2945,11 @@ public class Vala.CCodeBaseModule : CCodeModule {
 		var ccomma = new CCodeCommaExpression ();
 
 		if (context.profile == Profile.GOBJECT) {
-			if (type.data_type == gstringbuilder_type
-			    || type.data_type == garray_type
-			    || type.data_type == gbytearray_type
-			    || type.data_type == gptrarray_type) {
+			if (type.data_type != null && !type.data_type.is_reference_counting () &&
+			    (type.data_type == gstringbuilder_type
+			     || type.data_type == garray_type
+			     || type.data_type == gbytearray_type
+			     || type.data_type == gptrarray_type)) {
 				ccall.add_argument (new CCodeConstant ("TRUE"));
 			} else if (type.data_type == gthreadpool_type) {
 				ccall.add_argument (new CCodeConstant ("FALSE"));



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