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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Tue Aug 11 15:38:25 UTC 2009


Author: NotFound
Date: Tue Aug 11 15:38:19 2009
New Revision: 40491
URL: https://trac.parrot.org/parrot/changeset/40491

Log:
set auto_attrs on SchedulerMessage PMC

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

Modified: branches/auto_attrs/src/pmc/schedulermessage.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/schedulermessage.pmc	Tue Aug 11 13:35:52 2009	(r40490)
+++ branches/auto_attrs/src/pmc/schedulermessage.pmc	Tue Aug 11 15:38:19 2009	(r40491)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -20,7 +20,7 @@
 
 #include "parrot/scheduler_private.h"
 
-pmclass SchedulerMessage need_ext {
+pmclass SchedulerMessage need_ext auto_attrs {
     ATTR INTVAL  id;        /* The message's ID. */
     ATTR STRING *type;      /* The message's type. */
     ATTR PMC    *data;      /* Additional data for the message. */
@@ -37,14 +37,12 @@
 
     VTABLE void init() {
         Parrot_SchedulerMessage_attributes * const core_struct
-            = mem_allocate_zeroed_typed(Parrot_SchedulerMessage_attributes);
+            = (Parrot_SchedulerMessage_attributes *) PMC_data(SELF);
 
-        /* Set flags for custom GC mark and destroy. */
+        /* Set flags for custom GC mark. */
         PObj_custom_mark_SET(SELF);
-        PObj_active_destroy_SET(SELF);
 
         /* Set up the core struct. */
-        PMC_data(SELF)           = core_struct;
         core_struct->id          = 0;
         core_struct->type        = CONST_STRING(INTERP, "");
         core_struct->data        = PMCNULL;
@@ -189,20 +187,6 @@
 
 /*
 
-=item C<void destroy()>
-
-Free the scheduler's underlying struct.
-
-=cut
-
-*/
-    VTABLE void destroy() {
-        mem_sys_free(PMC_data(SELF));
-        PMC_data(SELF) = NULL;
-    }
-
-/*
-
 =item C<void mark()>
 
 Mark any referenced strings and PMCs.


More information about the parrot-commits mailing list