[svn:ponie] r340 - trunk/src/pmc
[email protected] 24 Aug 2005 15:55:00 -0000
| Newsgroups | perl.ponie.changes |
|---|---|
| Message-ID | <[email protected]> |
Author: nicholas
Date: Wed Aug 24 08:55:00 2005
New Revision: 340
Modified:
trunk/src/pmc/perl5cargo_cult.pmc
Log:
Use PL_Refcounts rather than registering/deregistering each PMC.
Modified: trunk/src/pmc/perl5cargo_cult.pmc
==============================================================================
--- trunk/src/pmc/perl5cargo_cult.pmc (original)
+++ trunk/src/pmc/perl5cargo_cult.pmc Wed Aug 24 08:55:00 2005
@@ -70,7 +70,9 @@ pmclass Perl5cargo_cult dynpmc {
PMC_struct_val(SELF) = head = malloc(sizeof(struct STRUCT_SV));
PMC_pmc_val(SELF) = NULL;
- Parrot_register_pmc(PL_Parrot, SELF);
+ /* This is the moral equivalent of SvREFCNT_inc(), and given that we
+ start at a 0 refcount, we're setting it to 1 here */
+ Parrot_PMC_set_pmc_pmckey(INTERP, PL_Refcounts, SELF, 0);
sv = MUMBLE(SELF);
@@ -758,7 +760,7 @@ pmclass Perl5cargo_cult dynpmc {
if (!PL_in_clean_all) {
FREE_SV_DEBUG_FILE(p);
Parrot_PMC_push_pmc(INTERP, PL_sv_pining, SELF);
- Parrot_unregister_pmc(INTERP, SELF);
+ Parrot_PMC_delete_pmckey(INTERP, PL_Refcounts, SELF);
}
break;
}