[svn:parrot] r40489 - branches/auto_attrs/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Tue Aug 11 12:13:14 UTC 2009
Author: NotFound
Date: Tue Aug 11 12:13:11 2009
New Revision: 40489
URL: https://trac.parrot.org/parrot/changeset/40489
Log:
set auto_attrs on Key PMC
Modified:
branches/auto_attrs/src/pmc/key.pmc
Modified: branches/auto_attrs/src/pmc/key.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/key.pmc Tue Aug 11 11:13:00 2009 (r40488)
+++ branches/auto_attrs/src/pmc/key.pmc Tue Aug 11 12:13:11 2009 (r40489)
@@ -18,7 +18,7 @@
*/
-pmclass Key need_ext {
+pmclass Key need_ext auto_attrs {
ATTR PMC *next_key; /* Sometimes it's the next key, sometimes it's
not. The Key code is like that. */
ATTR INTVAL int_key; /* int value of this key, or something magical if
@@ -40,26 +40,7 @@
*/
VTABLE void init() {
-
- Parrot_Key_attributes * const attrs =
- mem_allocate_zeroed_typed(Parrot_Key_attributes);
-
- PMC_data(SELF) = attrs;
- PObj_custom_mark_destroy_SETALL(SELF);
- }
-
-/*
-
-=item C<void destroy()>
-
-Destroy this Key, but not in the way anyone reading its code would want.
-
-=cut
-
-*/
- VTABLE void destroy() {
- mem_sys_free(PMC_data(SELF));
- PMC_data(SELF) = NULL;
+ PObj_custom_mark_SET(SELF);
}
/*
@@ -77,8 +58,6 @@
PMC *dkey = dest;
PMC *key = SELF;
- PObj_custom_mark_destroy_SETALL(dest);
-
for (; key ;) {
switch (PObj_get_FLAGS(key) & KEY_type_FLAGS) {
case KEY_integer_FLAG:
More information about the parrot-commits
mailing list