[svn:parrot] r38584 - trunk/src

petdance at svn.parrot.org petdance at svn.parrot.org
Fri May 8 04:17:52 UTC 2009


Author: petdance
Date: Fri May  8 04:17:52 2009
New Revision: 38584
URL: https://trac.parrot.org/parrot/changeset/38584

Log:
consted some strings, and fixed incorrect indentation

Modified:
   trunk/src/scheduler.c

Modified: trunk/src/scheduler.c
==============================================================================
--- trunk/src/scheduler.c	Fri May  8 04:10:42 2009	(r38583)
+++ trunk/src/scheduler.c	Fri May  8 04:17:52 2009	(r38584)
@@ -127,29 +127,29 @@
     while (VTABLE_get_integer(interp, scheduler) > 0) {
         PMC * const task = VTABLE_pop_pmc(interp, scheduler);
         if (!PMC_IS_NULL(task)) {
-        PMC *type_pmc = VTABLE_get_attr_str(interp, task, CONST_STRING(interp, "type"));
-        STRING *type = VTABLE_get_string(interp, type_pmc);
+            PMC    * const type_pmc = VTABLE_get_attr_str(interp, task, CONST_STRING(interp, "type"));
+            STRING * const type     = VTABLE_get_string(interp, type_pmc);
 
-        if (Parrot_str_equal(interp, type, CONST_STRING(interp, "callback"))) {
-            Parrot_cx_invoke_callback(interp, task);
-        }
-        else if (Parrot_str_equal(interp, type, CONST_STRING(interp, "timer"))) {
-            Parrot_cx_timer_invoke(interp, task);
-        }
-        else if (Parrot_str_equal(interp, type, CONST_STRING(interp, "event"))) {
-            PMC * const handler = Parrot_cx_find_handler_for_task(interp, task);
-            if (!PMC_IS_NULL(handler)) {
-                PMC * handler_sub = VTABLE_get_attr_str(interp, handler, CONST_STRING(interp, "code"));
-                Parrot_runops_fromc_args_event(interp, handler_sub,
-                    "vPP", handler, task);
+            if (Parrot_str_equal(interp, type, CONST_STRING(interp, "callback"))) {
+                Parrot_cx_invoke_callback(interp, task);
+            }
+            else if (Parrot_str_equal(interp, type, CONST_STRING(interp, "timer"))) {
+                Parrot_cx_timer_invoke(interp, task);
+            }
+            else if (Parrot_str_equal(interp, type, CONST_STRING(interp, "event"))) {
+                PMC * const handler = Parrot_cx_find_handler_for_task(interp, task);
+                if (!PMC_IS_NULL(handler)) {
+                    PMC * const handler_sub = VTABLE_get_attr_str(interp, handler, CONST_STRING(interp, "code"));
+                    Parrot_runops_fromc_args_event(interp, handler_sub,
+                            "vPP", handler, task);
+                }
+            }
+            else {
+                Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+                        "Unknown task type '%Ss'.\n", type);
             }
-        }
-        else {
-            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
-                "Unknown task type '%Ss'.\n", type);
-        }
 
-        Parrot_cx_delete_task(interp, task);
+            Parrot_cx_delete_task(interp, task);
         }
 
         /* If the scheduler was flagged to terminate, make sure you process all


More information about the parrot-commits mailing list