[svn:parrot] r47722 - trunk/src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Jun 20 08:51:14 UTC 2010


Author: bacek
Date: Sun Jun 20 08:51:14 2010
New Revision: 47722
URL: https://trac.parrot.org/parrot/changeset/47722

Log:
Add PackfileFixupEntry.init_pmc

Modified:
   trunk/src/pmc/packfilefixupentry.pmc

Modified: trunk/src/pmc/packfilefixupentry.pmc
==============================================================================
--- trunk/src/pmc/packfilefixupentry.pmc	Sun Jun 20 08:48:46 2010	(r47721)
+++ trunk/src/pmc/packfilefixupentry.pmc	Sun Jun 20 08:51:14 2010	(r47722)
@@ -47,6 +47,23 @@
         PObj_custom_mark_SET(SELF);
     }
 
+    VTABLE void init_pmc(PMC *init) {
+        Parrot_PackfileFixupEntry_attributes * attrs =
+                PMC_data_typed(SELF, Parrot_PackfileFixupEntry_attributes*);
+        STRING *name    = CONST_STRING_GEN(INTERP, "name");
+        STRING *type    = CONST_STRING_GEN(INTERP, "type");
+        STRING *offset  = CONST_STRING_GEN(INTERP, "offset");
+
+        attrs->name = VTABLE_get_string(INTERP,
+                        VTABLE_get_pmc_keyed_str(INTERP, init, name));
+        attrs->type = VTABLE_get_integer(INTERP,
+                        VTABLE_get_pmc_keyed_str(INTERP, init, type));
+        attrs->offset = VTABLE_get_integer(INTERP,
+                        VTABLE_get_pmc_keyed_str(INTERP, init, offset));
+
+        PObj_custom_mark_SET(SELF);
+    }
+
 /*
 
 =item C<void mark()>


More information about the parrot-commits mailing list