[svn:parrot] r40493 - branches/auto_attrs/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Tue Aug 11 18:16:06 UTC 2009
Author: NotFound
Date: Tue Aug 11 18:16:04 2009
New Revision: 40493
URL: https://trac.parrot.org/parrot/changeset/40493
Log:
set auto_attrs on Capture PMC
Modified:
branches/auto_attrs/src/pmc/capture.pmc
Modified: branches/auto_attrs/src/pmc/capture.pmc
==============================================================================
--- branches/auto_attrs/src/pmc/capture.pmc Tue Aug 11 16:07:57 2009 (r40492)
+++ branches/auto_attrs/src/pmc/capture.pmc Tue Aug 11 18:16:04 2009 (r40493)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
$Id$
=head1 NAME
@@ -26,7 +26,7 @@
if (!PARROT_CAPTURE(obj)->hash) \
PARROT_CAPTURE(obj)->hash = pmc_new((i), enum_class_Hash);
-pmclass Capture need_ext {
+pmclass Capture need_ext auto_attrs {
ATTR PMC *array;
ATTR PMC *hash;
ATTR INTVAL data_size;
@@ -37,31 +37,19 @@
Initializes the Capture instance.
-=item C<void destroy()>
-
-Free structures.
-
=cut
*/
VTABLE void init() {
- Parrot_Capture_attributes *capture = mem_allocate_typed(Parrot_Capture_attributes);
- PMC_data(SELF) = capture;
+ Parrot_Capture_attributes *capture =
+ (Parrot_Capture_attributes *) PMC_data(SELF);
capture->array = NULL;
capture->hash = NULL;
capture->data_size = CAPTURE_DATA_SIZE;
- PObj_active_destroy_SET(SELF);
PObj_custom_mark_SET(SELF);
}
- VTABLE void destroy() {
- if (PARROT_CAPTURE(SELF)) {
- mem_sys_free(PARROT_CAPTURE(SELF));
- PMC_data(SELF) = NULL;
- }
- }
-
/*
=item C<PMC *clone()>
More information about the parrot-commits
mailing list