[svn:parrot] r43697 - branches/pmc_freeze_with_pmcs/src/pmc

darbelo at svn.parrot.org darbelo at svn.parrot.org
Mon Feb 1 23:21:45 UTC 2010


Author: darbelo
Date: Mon Feb  1 23:21:43 2010
New Revision: 43697
URL: https://trac.parrot.org/parrot/changeset/43697

Log:
Sprinkle casts to make the compiler happy.

Modified:
   branches/pmc_freeze_with_pmcs/src/pmc/imageio.pmc

Modified: branches/pmc_freeze_with_pmcs/src/pmc/imageio.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/imageio.pmc	Mon Feb  1 22:00:55 2010	(r43696)
+++ branches/pmc_freeze_with_pmcs/src/pmc/imageio.pmc	Mon Feb  1 23:21:43 2010	(r43697)
@@ -37,11 +37,11 @@
 };
 
 PARROT_INLINE
-static opcode_t
+static opcode_t *
 GET_VISIT_CURSOR(PMC *pmc){
     char  *buf = (char *)Buffer_bufstart(PARROT_IMAGEIO(pmc)->buffer);
     size_t pos = PARROT_IMAGEIO(pmc)->pos;
-    return buf + pos;
+    return (opcode_t *)(buf + pos);
 }
 
 PARROT_INLINE
@@ -324,7 +324,7 @@
 
 */
     VTABLE void mark() {
-        Parrot_gc_mark_PObj_alive(INTERP, PARROT_IMAGEIO(SELF)->buffer);
+        Parrot_gc_mark_PObj_alive(INTERP, (PObj *)(PARROT_IMAGEIO(SELF)->buffer));
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->todo);
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->seen);
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->id_list);
@@ -388,7 +388,7 @@
 VTABLE void push_integer(INTVAL v) {
     size_t len = PF_size_integer() * sizeof (opcode_t);
     ensure_buffer_size(interp, SELF, len);
-    SET_VISIT_CURSOR(SELF, PF_store_integer(GET_VISIT_CURSOR(SELF), v));
+    SET_VISIT_CURSOR(SELF, (char *)PF_store_integer(GET_VISIT_CURSOR(SELF), v));
 }
 
 
@@ -406,7 +406,7 @@
 {
     size_t len = PF_size_number() * sizeof (opcode_t);
     ensure_buffer_size(interp, SELF, len);
-    SET_VISIT_CURSOR(SELF, PF_store_number(GET_VISIT_CURSOR(SELF), &v));
+    SET_VISIT_CURSOR(SELF, (char *)PF_store_number(GET_VISIT_CURSOR(SELF), &v));
 }
 
 
@@ -424,7 +424,7 @@
 {
     size_t len = PF_size_string(v) * sizeof (opcode_t);
     ensure_buffer_size(INTERP, SELF, len);
-    SET_VISIT_CURSOR(SELF, PF_store_string(GET_VISIT_CURSOR(SELF), v));
+    SET_VISIT_CURSOR(SELF, (char *)PF_store_string(GET_VISIT_CURSOR(SELF), v));
 }
 
 /*
@@ -457,7 +457,7 @@
 {
     opcode_t *pos  = GET_VISIT_CURSOR(SELF);
     const INTVAL i = PF_fetch_integer(PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
-    SET_VISIT_CURSOR(SELF, pos);
+    SET_VISIT_CURSOR(SELF, (char *)pos);
     BYTECODE_SHIFT_OK(SELF);
     return i;
 }
@@ -476,7 +476,7 @@
 VTABLE FLOATVAL shift_float() {
     opcode_t *pos    = GET_VISIT_CURSOR(SELF);
     const FLOATVAL f = PF_fetch_number(PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
-    SET_VISIT_CURSOR(SELF, pos);
+    SET_VISIT_CURSOR(SELF, (char *)pos);
     BYTECODE_SHIFT_OK(SELF);
     return f;
 }
@@ -496,7 +496,7 @@
 {
     opcode_t *pos    = GET_VISIT_CURSOR(SELF);
     STRING * const s = PF_fetch_string(interp, PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
-    SET_VISIT_CURSOR(SELF, pos);
+    SET_VISIT_CURSOR(SELF, (char *)pos);
     BYTECODE_SHIFT_OK(SELF);
     return s;
 }
@@ -548,7 +548,7 @@
 
         PARROT_ASSERT(image->_bufstart == image->strstart);
 
-        SET_VISIT_CURSOR(SELF, Buffer_bufstart(PARROT_IMAGEIO(SELF)->buffer));
+        SET_VISIT_CURSOR(SELF, (char *)Buffer_bufstart(PARROT_IMAGEIO(SELF)->buffer));
         PARROT_IMAGEIO(SELF)->input_length = image->strlen;
 
         PARROT_IMAGEIO(SELF)->pf->options |= PFOPT_PMC_FREEZE_ONLY;


More information about the parrot-commits mailing list