Author: fperrad
Date: Mon Mar 26 23:39:59 2007
New Revision: 17782
Modified:
trunk/languages/lua/pmc/luauserdata.pmc
Log:
[Lua]
- pb with finalizer
Modified: trunk/languages/lua/pmc/luauserdata.pmc
==============================================================================
--- trunk/languages/lua/pmc/luauserdata.pmc (original)
+++ trunk/languages/lua/pmc/luauserdata.pmc Mon Mar 26 23:39:59 2007
@@ -57,6 +57,7 @@
*/
void init () {
PMC_pmc_val(SELF) = NULL;
+ PObj_custom_mark_destroy_SETALL(SELF);
}
/*
@@ -83,10 +84,14 @@
*/
void destroy () {
+ /* printf("userdata destroy\n"); */
+#if 0
+ /* FIXME : crash because metatable is already freed */
PMC* meth = find_meth(INTERP, SELF, "__gc");
if (meth != NULL) {
(void)Parrot_runops_fromc_args(INTERP, meth, "vP", SELF);
}
+#endif
if (PMC_pmc_val(SELF)) {
PMC_pmc_val(SELF) = NULL;
}