[svn:parrot] r40538 - branches/pluggable_runcore/src/runcore

cotto at svn.parrot.org cotto at svn.parrot.org
Fri Aug 14 00:32:18 UTC 2009


Author: cotto
Date: Fri Aug 14 00:32:16 2009
New Revision: 40538
URL: https://trac.parrot.org/parrot/changeset/40538

Log:
[profiling] do a special pointer dance so the profiling runcore's destructor is only called when the profiling runcore has been initialized

Modified:
   branches/pluggable_runcore/src/runcore/cores.c

Modified: branches/pluggable_runcore/src/runcore/cores.c
==============================================================================
--- branches/pluggable_runcore/src/runcore/cores.c	Fri Aug 14 00:15:27 2009	(r40537)
+++ branches/pluggable_runcore/src/runcore/cores.c	Fri Aug 14 00:32:16 2009	(r40538)
@@ -768,7 +768,7 @@
     coredata->name             = CONST_STRING(interp, "profiling");
     coredata->opinit           = PARROT_CORE_OPLIB_INIT;
     coredata->runops           = init_profiling_core;
-    coredata->destroy          = destroy_profiling_core;
+    coredata->destroy          = NULL;
     coredata->prepare_run      = NULL;
 
     PARROT_RUNCORE_FUNC_TABLE_SET(coredata);
@@ -1035,7 +1035,10 @@
 {
     ASSERT_ARGS(init_profiling_core)
 
-    runcore->runops           = runops_profiling_core;
+    runcore->runops  = runops_profiling_core;
+    runcore->destroy = destroy_profiling_core;
+
+    fprintf(stderr, "PROFILING INIT CALLED\n");
 
     return runops_profiling_core(interp, runcore, pc);
 }


More information about the parrot-commits mailing list