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

NotFound at svn.parrot.org NotFound at svn.parrot.org
Thu Aug 13 18:54:59 UTC 2009


Author: NotFound
Date: Thu Aug 13 18:54:56 2009
New Revision: 40526
URL: https://trac.parrot.org/parrot/changeset/40526

Log:
restoring destroy on Exception PMC, allison++

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

Modified: branches/auto_attrs/src/pmc/exception.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/exception.pmc	Thu Aug 13 15:04:48 2009	(r40525)
+++ branches/auto_attrs/src/pmc/exception.pmc	Thu Aug 13 18:54:56 2009	(r40526)
@@ -83,7 +83,8 @@
 */
 
     VTABLE void init() {
-        /* Set flags for custom GC mark. */
+        /* Set flags for custom GC mark and destroy. */
+        PObj_active_destroy_SET(SELF);
         PObj_custom_mark_SET(SELF);
 
         SET_ATTR_severity(INTERP, SELF, EXCEPT_error);
@@ -123,6 +124,7 @@
         }
 
         /* Set flags for custom GC mark. */
+        PObj_active_destroy_SET(SELF);
         PObj_custom_mark_SET(SELF);
 
         /* Set up the core struct and default values for the exception object. */
@@ -163,6 +165,22 @@
 
 /*
 
+=item C<void destroy()>
+
+Destroys the exception.
+
+=cut
+
+*/
+
+    VTABLE void destroy() {
+        Parrot_Exception_attributes * const core_struct = PARROT_EXCEPTION(SELF);
+        if (core_struct && core_struct->thrower)
+            Parrot_free_context(interp, core_struct->thrower, 1);
+    }
+
+/*
+
 =item C<INTVAL get_bool()>
 
 Return true.


More information about the parrot-commits mailing list