]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Do not warn when copying delegates with --enable-deprecated
authorLuca Bruno <lucabru@src.gnome.org>
Sun, 14 Aug 2011 19:37:51 +0000 (21:37 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Sun, 14 Aug 2011 19:39:04 +0000 (21:39 +0200)
Fixes bug 656266.

codegen/valaccodebasemodule.vala

index b9208e7086c721bd81d67f1092f303f8603b0a41..14ffc8e268165588753394c3e31236864da220b1 100644 (file)
@@ -3785,7 +3785,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                if (type is DelegateType) {
                        var delegate_type = (DelegateType) type;
-                       if (delegate_type.delegate_symbol.has_target) {
+                       if (delegate_type.delegate_symbol.has_target && !context.deprecated) {
                                Report.deprecated (node.source_reference, "copying delegates is discouraged");
                        }
                        result.delegate_target_destroy_notify_cvalue = new CCodeConstant ("NULL");