[svn:parrot] r47989 - branches/gsoc_threads/src/pmc

mikehh at svn.parrot.org mikehh at svn.parrot.org
Mon Jul 5 00:24:55 UTC 2010


Author: mikehh
Date: Mon Jul  5 00:24:54 2010
New Revision: 47989
URL: https://trac.parrot.org/parrot/changeset/47989

Log:
fix codetest failure - there should be at least one space between a C keyword and any subsequent open parenthesis and trailing whitespace

Modified:
   branches/gsoc_threads/src/pmc/pmclist.pmc

Modified: branches/gsoc_threads/src/pmc/pmclist.pmc
==============================================================================
--- branches/gsoc_threads/src/pmc/pmclist.pmc	Mon Jul  5 00:17:17 2010	(r47988)
+++ branches/gsoc_threads/src/pmc/pmclist.pmc	Mon Jul  5 00:24:54 2010	(r47989)
@@ -83,7 +83,7 @@
         GET_ATTR_head(INTERP, SELF, tmp);
         aa = (PMC_List_Item*) tmp;
 
-        while(aa != NULL) {
+        while (aa != NULL) {
             bb = aa;
             aa = aa->next;
             free(bb);
@@ -97,7 +97,7 @@
 
 =cut
 */
-    
+
     VTABLE INTVAL get_integer() {
         INTVAL size;
         GET_ATTR_size(INTERP, SELF, size);
@@ -141,14 +141,14 @@
         head = item->next;
         SET_ATTR_head(INTERP, SELF, head);
 
-        if(head == NULL) {
+        if (head == NULL) {
             /* size == 0 */
             SET_ATTR_foot(INTERP, SELF, NULL);
         } else {
             head->prev = NULL;
         }
-        
-        if(size == 1) {
+
+        if (size == 1) {
             head->next = NULL;
             SET_ATTR_foot(INTERP, SELF, head);
         }
@@ -178,20 +178,20 @@
         GET_ATTR_foot(INTERP, SELF, tmp);
         foot = (PMC_List_Item*) tmp;
 
-        item = (PMC_List_Item*) malloc(sizeof(PMC_List_Item));
+        item = (PMC_List_Item*) malloc(sizeof (PMC_List_Item));
         item->next = NULL;
         item->prev = foot;
         item->data = value;
 
-        if(foot)
+        if (foot)
             foot->next = item;
 
         size += 1;
-        
+
         SET_ATTR_foot(INTERP, SELF, item);
         SET_ATTR_size(INTERP, SELF, size);
 
-        if(size == 1)
+        if (size == 1)
             SET_ATTR_head(INTERP, SELF, item);
 
         return;
@@ -227,14 +227,14 @@
         foot = item->prev;
         SET_ATTR_foot(INTERP, SELF, foot);
 
-        if(foot == NULL) {
+        if (foot == NULL) {
             /* size == 0 */
             SET_ATTR_head(INTERP, SELF, NULL);
         } else {
             foot->next = NULL;
         }
-        
-        if(size == 1) {
+
+        if (size == 1) {
             foot->prev = NULL;
             SET_ATTR_head(INTERP, SELF, foot);
         }
@@ -264,20 +264,20 @@
         GET_ATTR_head(INTERP, SELF, tmp);
         head = (PMC_List_Item*) tmp;
 
-        item = (PMC_List_Item*) malloc(sizeof(PMC_List_Item));
+        item = (PMC_List_Item*) malloc(sizeof (PMC_List_Item));
         item->prev = NULL;
         item->next = head;
         item->data = value;
 
-        if(head)
+        if (head)
             head->prev = item;
 
         size += 1;
-        
+
         SET_ATTR_head(INTERP, SELF, item);
         SET_ATTR_size(INTERP, SELF, size);
 
-        if(size == 1)
+        if (size == 1)
             SET_ATTR_foot(INTERP, SELF, item);
 
         return;
@@ -301,11 +301,11 @@
         GET_ATTR_head(INTERP, SELF, tmp);
         it = (PMC_List_Item*) tmp;
 
-        while(it != NULL) {
+        while (it != NULL) {
             VTABLE_push_pmc(INTERP, copy, it->data);
             it = it->next;
         }
-        
+
         return copy;
     }
 
@@ -328,7 +328,7 @@
         GET_ATTR_head(INTERP, SELF, tmp);
         it = (PMC_List_Item*) tmp;
 
-        while(it != NULL) {
+        while (it != NULL) {
             res = Parrot_str_concat(INTERP, res, VTABLE_get_repr(INTERP, it->data));
             res = Parrot_str_concat(INTERP, res, space);
             it = it->next;
@@ -369,7 +369,7 @@
         GET_ATTR_head(INTERP, SELF, tmp);
         it = (PMC_List_Item*) tmp;
 
-        while(it != NULL) {
+        while (it != NULL) {
             VISIT_PMC(INTERP, info, it->data);
             it = it->next;
         }
@@ -387,7 +387,7 @@
         n = VTABLE_shift_integer(INTERP, info);
         SET_ATTR_size(INTERP, SELF, n);
 
-        for(i = 0; i < n; ++i)
+        for (i = 0; i < n; ++i)
             VTABLE_push_pmc(INTERP, SELF, PMCNULL);
     }
 
@@ -406,8 +406,8 @@
         GET_ATTR_head(INTERP, SELF, tmp);
         it = (PMC_List_Item*) tmp;
 
-        while(it != NULL) {
-            if(!PObj_is_PMC_TEST(it->data)) {
+        while (it != NULL) {
+            if (!PObj_is_PMC_TEST(it->data)) {
                 fprintf(stderr, "not a pmc\n");
                 exit(1);
             }
@@ -461,7 +461,7 @@
         VTABLE_push_pmc(INTERP, SELF, value);
     }
 
-/* 
+/*
 =item METHOD insert_by_number(PMC* value)
 
 Inserts an item into an ordered list by it's number value.
@@ -491,7 +491,7 @@
 */
 
 PARROT_EXPORT
-void 
+void
 Parrot_pmc_list_insert_by_number(PARROT_INTERP, PMC *list, PMC *value) {
     void *tmp;
     PMC_List_Item *item;
@@ -503,29 +503,29 @@
     GETATTR_PMCList_size(interp, list, size);
     GETATTR_PMCList_head(interp, list, tmp);
 
-    item = (PMC_List_Item*) malloc(sizeof(PMC_List_Item));
+    item = (PMC_List_Item*) malloc(sizeof (PMC_List_Item));
     item->data = value;
     item->next = (PMC_List_Item*) tmp;
     item->prev = NULL;
 
     vkey = VTABLE_get_number(interp, value);
-    
+
     /* Find the list item to insert before */
-    while(item->next != NULL) {
+    while (item->next != NULL) {
         ikey = VTABLE_get_number(interp, item->next->data);
-        if(ikey > vkey)
+        if (ikey > vkey)
             break;
         item->prev = item->next;
         item->next = item->next->next;
     }
 
-    if(item->next == NULL) {
+    if (item->next == NULL) {
         SETATTR_PMCList_foot(interp, list, item);
     } else {
         item->next->prev = item;
     }
 
-    if(item->prev == NULL) {
+    if (item->prev == NULL) {
         SETATTR_PMCList_head(interp, list, item);
     } else {
         item->prev->next = item;


More information about the parrot-commits mailing list