]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Drop unreachable and misplaced code
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 17 Oct 2019 06:50:14 +0000 (08:50 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 7 Nov 2019 10:52:30 +0000 (11:52 +0100)
Dropped with 8aa6299ea7a39e7a652ce3896324aaa47af99a18 and falsely
reintroduced with 7a429688cdf0fd16cc1503a7666681792e309da8

codegen/valaccodemethodmodule.vala

index 2546b4d8a003e7d82fe7036b2535b9fe09a7cd4b..89e65a38d8506fb07f65c43883dcdc94282a4d74 100644 (file)
@@ -773,23 +773,6 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                                                creturn_type = new VoidType ();
                                        }
 
-
-                                       if (current_type_symbol is Class && gobject_type != null && current_class.is_subtype_of (gobject_type)
-                                           && current_class.has_type_parameters ()
-                                           && !((CreationMethod) m).chain_up) {
-                                               var ccond = new CCodeBinaryExpression (CCodeBinaryOperator.GREATER_THAN, new CCodeIdentifier ("__params_it"), new CCodeIdentifier ("__params"));
-                                               ccode.open_while (ccond);
-                                               ccode.add_expression (new CCodeUnaryExpression (CCodeUnaryOperator.PREFIX_DECREMENT, new CCodeIdentifier ("__params_it")));
-                                               var cunsetcall = new CCodeFunctionCall (new CCodeIdentifier ("g_value_unset"));
-                                               cunsetcall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeMemberAccess.pointer (new CCodeIdentifier ("__params_it"), "value")));
-                                               ccode.add_expression (cunsetcall);
-                                               ccode.close ();
-
-                                               var cfreeparams = new CCodeFunctionCall (new CCodeIdentifier ("g_free"));
-                                               cfreeparams.add_argument (new CCodeIdentifier ("__params"));
-                                               ccode.add_expression (cfreeparams);
-                                       }
-
                                        if (current_type_symbol is Class && !m.coroutine) {
                                                CCodeExpression cresult = new CCodeIdentifier ("self");
                                                if (get_ccode_type (m) != null) {