Author: jhorwitz
Date: Sun Dec 30 09:25:59 2007
New Revision: 304
Modified:
mod_parrot/trunk/src/parrot_util.c
Log:
register PMCs we create so GC doesn't accidentally destroy them.
Modified: mod_parrot/trunk/src/parrot_util.c
==============================================================================
--- mod_parrot/trunk/src/parrot_util.c (original)
+++ mod_parrot/trunk/src/parrot_util.c Sun Dec 30 09:25:59 2007
@@ -44,6 +44,7 @@
typenum = Parrot_PMC_typenum(interp, "SArray");
namespace = (Parrot_PMC)Parrot_PMC_new(interp, typenum);
+ Parrot_register_pmc(interp, namespace);
Parrot_PMC_set_intval(interp, namespace, 3);
Parrot_PMC_set_cstring_intkey(interp, namespace, 0, "ModParrot");
Parrot_PMC_set_cstring_intkey(interp, namespace, 1, "HLL");
@@ -51,6 +52,8 @@
sub = Parrot_find_global_k(interp, namespace, MAKE_PARROT_STRING(name));
+ Parrot_unregister_pmc(interp, namespace);
+
return(sub);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.