[svn:parrot] r36612 - branches/rename_pccinvoke/src

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Thu Feb 12 00:19:16 UTC 2009


Author: whiteknight
Date: Thu Feb 12 00:19:15 2009
New Revision: 36612
URL: https://trac.parrot.org/parrot/changeset/36612

Log:
[rename_pccinvoke] update src/scheduler.c, and make sure to initialize a few variables in src/oo.c

Modified:
   branches/rename_pccinvoke/src/oo.c
   branches/rename_pccinvoke/src/scheduler.c

Modified: branches/rename_pccinvoke/src/oo.c
==============================================================================
--- branches/rename_pccinvoke/src/oo.c	Thu Feb 12 00:09:02 2009	(r36611)
+++ branches/rename_pccinvoke/src/oo.c	Thu Feb 12 00:19:15 2009	(r36612)
@@ -100,7 +100,7 @@
 Parrot_oo_extract_methods_from_namespace(PARROT_INTERP, ARGIN(PMC *self), ARGIN(PMC *ns))
 {
    ASSERT_ARGS(Parrot_oo_extract_methods_from_namespace)
-   PMC *methods, *vtable_overrides;
+   PMC *methods = PMCNULL, *vtable_overrides = PMCNULL;
 
     /* Pull in methods from the namespace, if any. */
    if (PMC_IS_NULL(ns))
@@ -1079,12 +1079,11 @@
     ASSERT_ARGS(Parrot_ComputeMRO_C3)
     PMC *result;
     PMC * const merge_list = pmc_new(interp, enum_class_ResizablePMCArray);
-    PMC *immediate_parents = pmc_new(interp, enum_class_Undef);
+    PMC *immediate_parents = PMCNULL;
     int i, parent_count;
 
     /* Now get immediate parents list. */
-    Parrot_pcc_invoke_method_from_c_args(interp, _class, CONST_STRING(interp, "parents"),
-        "->P", &immediate_parents);
+    Parrot_pcc_invoke_method_from_c_args(interp, _class, CONST_STRING(interp, "parents"), "->P", &immediate_parents);
 
     if (!immediate_parents)
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_METHOD_NOT_FOUND,
@@ -1148,15 +1147,15 @@
 PARROT_EXPORT
 void
 Parrot_ComposeRole(PARROT_INTERP, ARGIN(PMC *role),
-                        ARGIN(PMC *exclude), int got_exclude,
-                        ARGIN(PMC *alias),   int got_alias,
-                        ARGIN(PMC *methods_hash), ARGIN(PMC *roles_list))
+    ARGIN(PMC *exclude), int got_exclude,
+    ARGIN(PMC *alias),   int got_alias,
+    ARGIN(PMC *methods_hash), ARGIN(PMC *roles_list))
 {
     ASSERT_ARGS(Parrot_ComposeRole)
-    PMC *methods;
-    PMC *methods_iter;
-    PMC *roles_of_role;
-    PMC *proposed_add_methods;
+    PMC *methods = PMCNULL;
+    PMC *methods_iter = PMCNULL;
+    PMC *roles_of_role = PMCNULL;
+    PMC *proposed_add_methods = PMCNULL;
 
     int i, roles_of_role_count;
 

Modified: branches/rename_pccinvoke/src/scheduler.c
==============================================================================
--- branches/rename_pccinvoke/src/scheduler.c	Thu Feb 12 00:09:02 2009	(r36611)
+++ branches/rename_pccinvoke/src/scheduler.c	Thu Feb 12 00:19:15 2009	(r36612)
@@ -644,7 +644,8 @@
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
             "Scheduler was not initialized for this interpreter.\n");
 
-    Parrot_PCCINVOKE(interp, interp->scheduler, add_handler, "P->", handler);
+    Parrot_pcc_invoke_method_from_c_args(interp, interp->scheduler,
+        add_handler, "P->", handler);
 }
 
 /*
@@ -667,7 +668,7 @@
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
             "Scheduler was not initialized for this interpreter.\n");
 
-    Parrot_PCCINVOKE(interp, interp->scheduler, CONST_STRING(interp, "delete_handler"), "S->", handler_type);
+    Parrot_pcc_invoke_method_from_c_args(interp, interp->scheduler, CONST_STRING(interp, "delete_handler"), "S->", handler_type);
 }
 
 /*
@@ -692,7 +693,7 @@
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
             "Scheduler was not initialized for this interpreter.\n");
 
-    Parrot_PCCINVOKE(interp, interp->scheduler, CONST_STRING(interp, "count_handlers"), "S->I", handler_type, &count);
+    Parrot_pcc_invoke_method_from_c_args(interp, interp->scheduler, CONST_STRING(interp, "count_handlers"), "S->I", handler_type, &count);
 
     return count;
 }
@@ -808,7 +809,7 @@
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
             "Scheduler was not initialized for this interpreter.\n");
 
-    Parrot_PCCINVOKE(interp, interp->scheduler, CONST_STRING(interp, "find_handler"), "P->P", task, &handler);
+    Parrot_pcc_invoke_method_from_c_args(interp, interp->scheduler, CONST_STRING(interp, "find_handler"), "P->P", task, &handler);
 
 #if CX_DEBUG
     fprintf(stderr, "done searching for handler\n");
@@ -891,8 +892,7 @@
 
             if (!PMC_IS_NULL(handler)) {
                 INTVAL valid_handler = 0;
-                Parrot_PCCINVOKE(interp, handler, CONST_STRING(interp, "can_handle"),
-                        "P->I", task, &valid_handler);
+                Parrot_pcc_invoke_method_from_c_args(interp, handler, CONST_STRING(interp, "can_handle"), "P->I", task, &valid_handler);
 
                 if (valid_handler) {
                     if (task->vtable->base_type == enum_class_Exception) {


More information about the parrot-commits mailing list