[svn:parrot] r40367 - trunk/src/dynpmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Sat Aug 1 23:05:55 UTC 2009


Author: NotFound
Date: Sat Aug  1 23:05:54 2009
New Revision: 40367
URL: https://trac.parrot.org/parrot/changeset/40367

Log:
[cage] set PMC_data to NULL in destroy on several dynpmc, TT #895

Modified:
   trunk/src/dynpmc/dynlexpad.pmc
   trunk/src/dynpmc/gdbmhash.pmc
   trunk/src/dynpmc/rational.pmc

Modified: trunk/src/dynpmc/dynlexpad.pmc
==============================================================================
--- trunk/src/dynpmc/dynlexpad.pmc	Sat Aug  1 22:49:23 2009	(r40366)
+++ trunk/src/dynpmc/dynlexpad.pmc	Sat Aug  1 23:05:54 2009	(r40367)
@@ -189,6 +189,7 @@
             PARROT_DYNLEXPAD(SELF)->hash = NULL;
         }
         mem_sys_free(PMC_data(SELF));
+        PMC_data(SELF) = NULL;
     }
 /*
 

Modified: trunk/src/dynpmc/gdbmhash.pmc
==============================================================================
--- trunk/src/dynpmc/gdbmhash.pmc	Sat Aug  1 22:49:23 2009	(r40366)
+++ trunk/src/dynpmc/gdbmhash.pmc	Sat Aug  1 23:05:54 2009	(r40367)
@@ -114,6 +114,7 @@
         mem_sys_free(
                 ((Parrot_GDBMHash_attributes *)PMC_data(SELF))->db_handle);
         mem_sys_free(PMC_data(SELF));
+        PMC_data(SELF) = NULL;
     }
 
     VTABLE void* get_pointer() {

Modified: trunk/src/dynpmc/rational.pmc
==============================================================================
--- trunk/src/dynpmc/rational.pmc	Sat Aug  1 22:49:23 2009	(r40366)
+++ trunk/src/dynpmc/rational.pmc	Sat Aug  1 23:05:54 2009	(r40367)
@@ -302,6 +302,7 @@
         mpq_clear(RT(SELF));
         mem_sys_free(RT(SELF));
         mem_sys_free(PMC_data(SELF));
+        PMC_data(SELF) = NULL;
       #else
         RAISE_EXCEPTION
       #endif


More information about the parrot-commits mailing list