]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GAsync: Drop async_only attribute support
authorJürg Billeter <j@bitron.ch>
Sun, 13 Sep 2009 14:13:29 +0000 (16:13 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 13 Sep 2009 15:02:47 +0000 (17:02 +0200)
codegen/valaccodemethodcallmodule.vala
vala/valacodewriter.vala
vala/valaformalparameter.vala

index 2fd5f4ae3180476c8aa669b51d41eb06dea28c73..e881f9d108a3e65d246f717887558aeb9fa1d342 100644 (file)
@@ -264,25 +264,6 @@ internal class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                                var param = params_it.get ();
                                ellipsis = param.params_array || param.ellipsis;
                                if (!ellipsis) {
-                                       if (param.async_only &&
-                                          /* only skip if we are in a sync function (or property handler) */
-                                            (current_method == null || !current_method.coroutine) &&
-                                          /* and not manually starting async */
-                                           (ma == null || ma.member_name != "begin")) {
-                                               /* [CCode (async_only = true)] and we're making a
-                                                * synchronous version of the call.  Emit the arg
-                                                * at the start of a comma expression so that we
-                                                * get any side effects but otherwise ignore the
-                                                * value.
-                                                */
-                                               var comma = new CCodeCommaExpression ();
-                                               comma.append_expression ((CCodeExpression) arg.ccodenode);
-                                               comma.append_expression (ccall_expr);
-                                               ccall_expr = comma;
-
-                                               continue;
-                                       }
-
                                        // if the vala argument expands to multiple C arguments,
                                        // we have to make sure that the C arguments don't depend
                                        // on each other as there is no guaranteed argument
index 50ff64f95dac73143764a695be54e8b1e9fcc165..736513fdf7f0fb61a2fb82ad28d27023cf7903d0 100644 (file)
@@ -709,10 +709,6 @@ public class Vala.CodeWriter : CodeVisitor {
                                ccode_params.append_printf ("%sdelegate_target_pos = %g", separator, param.cdelegate_target_parameter_position);
                                separator = ", ";
                        }
-                       if (param.async_only) {
-                               ccode_params.append_printf ("%sasync_only = true", separator);
-                               separator = ", ";
-                       }
 
                        if (ccode_params.len > 0) {
                                write_string ("[CCode (%s)] ".printf (ccode_params.str));
index fe22e2830e0892ffc3e66584a233ce7089736000..6c6e575b5cc7fa33a2760819ed1342cf3d199485 100644 (file)
@@ -96,12 +96,6 @@ public class Vala.FormalParameter : Symbol {
         */
        public double cdelegate_target_parameter_position { get; set; }
 
-       /**
-        * Specifies that the argument should only be emitted for async
-        * calls (ie: from yielding functions).
-        */
-       public bool async_only { get; set; }
-
        /**
         * Specifies the type of the parameter in the C function.
         */
@@ -178,9 +172,6 @@ public class Vala.FormalParameter : Symbol {
                if (a.has_argument ("delegate_target_pos")) {
                        cdelegate_target_parameter_position = a.get_double ("delegate_target_pos");
                }
-               if (a.has_argument ("async_only")) {
-                       async_only = a.get_bool ("async_only");
-               }
        }
 
        /**