[svn:parrot] r40421 - branches/auto_attrs/src/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed Aug 5 12:51:07 UTC 2009


Author: NotFound
Date: Wed Aug  5 12:51:06 2009
New Revision: 40421
URL: https://trac.parrot.org/parrot/changeset/40421

Log:
set auto_attrs in unmanagedstruct pmc

Modified:
   branches/auto_attrs/src/pmc/unmanagedstruct.pmc

Modified: branches/auto_attrs/src/pmc/unmanagedstruct.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/unmanagedstruct.pmc	Wed Aug  5 12:44:10 2009	(r40420)
+++ branches/auto_attrs/src/pmc/unmanagedstruct.pmc	Wed Aug  5 12:51:06 2009	(r40421)
@@ -651,7 +651,7 @@
     return toff;
 }
 
-pmclass UnManagedStruct need_ext no_ro {
+pmclass UnManagedStruct need_ext auto_attrs no_ro {
     ATTR void   *ptr;   /* the struct that this UnManagedStruct isn't managing */
     ATTR PMC    *init;  /* the initializer used with this UnManagedStruct */
     ATTR INTVAL  size;  /* the size of the struct */
@@ -664,37 +664,6 @@
 
 =over 4
 
-=item C<void init()>
-
-Initializes the C<struct> with a default value of C<NULL>.
-
-=cut
-
-*/
-
-    VTABLE void init() {
-        Parrot_UnManagedStruct_attributes *attrs =
-            mem_allocate_zeroed_typed(Parrot_UnManagedStruct_attributes);
-        PMC_data(SELF) = attrs;
-        PObj_active_destroy_SET(SELF);
-    }
-
-/*
-
-=item C<void destroy()>
-
-Destroys the subroutine.
-
-=cut
-
-*/
-
-    VTABLE void destroy() {
-        mem_sys_free(PMC_data(SELF));
-        PMC_data(SELF) = NULL;
-    }
-
-
 /*
 
 =item C<void init_pmc(PMC *value)>
@@ -724,9 +693,6 @@
 */
 
     VTABLE void init_pmc(PMC *value) {
-        Parrot_UnManagedStruct_attributes *attrs =
-            mem_allocate_zeroed_typed(Parrot_UnManagedStruct_attributes);
-        PMC_data(SELF) = attrs;
         SELF.set_pmc(value);
     }
 


More information about the parrot-commits mailing list