[svn:parrot] r35655 - trunk/src/pmc

[email protected]
Newsgroups perl.cvs.parrot
Message-ID <[email protected]>
Author: cotto
Date: Fri Jan 16 15:27:15 2009
New Revision: 35655

Modified:
   trunk/src/pmc/capture.pmc

Log:
[pmc] undoing Capture ATTR conversion, since CallSignature extends it


Modified: trunk/src/pmc/capture.pmc
==============================================================================
--- trunk/src/pmc/capture.pmc	(original)
+++ trunk/src/pmc/capture.pmc	Fri Jan 16 15:27:15 2009
@@ -30,9 +30,8 @@
         PARROT_CAPTURE(obj)->hash = pmc_new((i), enum_class_Hash);
 
 pmclass Capture need_ext {
-    ATTR PMC    *array;
-    ATTR PMC    *hash;
-    ATTR INTVAL  data_size;
+    ATTR PMC *array;
+    ATTR PMC *hash;
 
 /*
 
@@ -53,7 +52,7 @@
         PMC_data(SELF)          = capture;
         capture->array          = NULL;
         capture->hash           = NULL;
-        capture->data_size      = CAPTURE_DATA_SIZE;
+        PMC_int_val(SELF)       = CAPTURE_DATA_SIZE;
         PObj_active_destroy_SET(SELF);
         PObj_custom_mark_SET(SELF);
     }
@@ -63,6 +62,8 @@
             mem_sys_free(PARROT_CAPTURE(SELF));
             PMC_data(SELF) = NULL;
         }
+
+        PMC_int_val(SELF)  = 0;
     }
 
 /*
@@ -523,8 +524,7 @@
         if (!data)
             return;
 
-        GET_ATTR_data_size(INTERP, SELF, i);
-        for (i = i - 1; i >= 0; --i)
+        for (i = PMC_int_val(SELF) - 1; i >= 0; --i)
             if (data[i])
                 pobject_lives(interp, (PObj *)data[i]);
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.