[svn:parrot] r43672 - branches/pmc_freeze_with_pmcs/src

darbelo at svn.parrot.org darbelo at svn.parrot.org
Mon Feb 1 00:58:14 UTC 2010


Author: darbelo
Date: Mon Feb  1 00:58:13 2010
New Revision: 43672
URL: https://trac.parrot.org/parrot/changeset/43672

Log:
Switch the code in pmc_freeze.c to use the ImageIO PMC.
This causes segfaults on freezing, which interrupts the build.

Modified:
   branches/pmc_freeze_with_pmcs/src/pmc_freeze.c

Modified: branches/pmc_freeze_with_pmcs/src/pmc_freeze.c
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc_freeze.c	Mon Feb  1 00:46:29 2010	(r43671)
+++ branches/pmc_freeze_with_pmcs/src/pmc_freeze.c	Mon Feb  1 00:58:13 2010	(r43672)
@@ -797,10 +797,9 @@
 Parrot_freeze(PARROT_INTERP, ARGIN(PMC *pmc))
 {
     ASSERT_ARGS(Parrot_freeze)
-    visit_info info;
-
-    visit_info_init(interp, &info, VISIT_FREEZE_NORMAL, STRINGNULL, pmc);
-    return Parrot_str_new_from_buffer(interp, info.buffer, OUTPUT_LENGTH(&info));
+    PMC *image = pmc_new(interp, enum_class_ImageIO);
+    VTABLE_set_pmc(interp, image, pmc);
+    return VTABLE_get_string(interp, image);
 }
 
 
@@ -828,7 +827,7 @@
 {
     ASSERT_ARGS(Parrot_thaw)
 
-    visit_info  info;
+    PMC        *info     = pmc_new(interp, enum_class_ImageIO);
     int         gc_block = 0;
     PMC        *result;
 
@@ -849,9 +848,8 @@
         gc_block = 1;
     }
 
-    info.thaw_ptr = &result;
-    visit_info_init(interp, &info, VISIT_THAW_NORMAL, image, PMCNULL);
-    BYTECODE_SHIFT_OK(&info);
+    VTABLE_set_pointer(interp, info, &result);
+    VTABLE_set_string_native(interp, info, image);
 
     if (gc_block) {
         Parrot_unblock_GC_mark(interp);


More information about the parrot-commits mailing list