[svn:parrot] r40422 - branches/auto_attrs/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Wed Aug 5 12:57:04 UTC 2009
Author: NotFound
Date: Wed Aug 5 12:57:03 2009
New Revision: 40422
URL: https://trac.parrot.org/parrot/changeset/40422
Log:
set auto_attrs in managedstruct pmc
Modified:
branches/auto_attrs/src/pmc/managedstruct.pmc
Modified: branches/auto_attrs/src/pmc/managedstruct.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/managedstruct.pmc Wed Aug 5 12:51:06 2009 (r40421)
+++ branches/auto_attrs/src/pmc/managedstruct.pmc Wed Aug 5 12:57:03 2009 (r40422)
@@ -22,7 +22,7 @@
typedef void (*custom_free_func_t)(PARROT_INTERP, void *ptr, void *priv);
typedef PMC * (*custom_clone_func_t)(PARROT_INTERP, PMC *ptr, void *priv);
-pmclass ManagedStruct extends UnManagedStruct need_ext {
+pmclass ManagedStruct extends UnManagedStruct need_ext auto_attrs {
/* if custom_free_func and ptr (inherited from UnManagedStruct) are both set,
* custom_free_func is called before the normal destroy() function does any
* work.
@@ -46,11 +46,7 @@
*/
VTABLE void init() {
- Parrot_ManagedStruct_attributes *attrs =
- mem_allocate_zeroed_typed(Parrot_ManagedStruct_attributes);
PObj_active_destroy_SET(SELF);
- PMC_data(SELF) = attrs;
-
}
/*
@@ -91,8 +87,6 @@
} else
mem_sys_free(ptr);
}
- mem_sys_free(PMC_data(SELF));
- PMC_data(SELF) = NULL;
}
/*
More information about the parrot-commits
mailing list