[Jifty-commit] r5425 - Runops-Hook/trunk
Jifty commits
jifty-commit at lists.jifty.org
Sat May 10 07:40:01 EDT 2008
Author: nothingmuch
Date: Sat May 10 07:40:00 2008
New Revision: 5425
Modified:
Runops-Hook/trunk/Hook.xs
Log:
PROTOTYPES: ENABLE
Modified: Runops-Hook/trunk/Hook.xs
==============================================================================
--- Runops-Hook/trunk/Hook.xs (original)
+++ Runops-Hook/trunk/Hook.xs Sat May 10 07:40:00 2008
@@ -6,6 +6,8 @@
#define XPUSHREF(x) XPUSHs(sv_2mortal(newRV_inc(x)))
+int (*old_runops ) ( pTHX );
+
bool (*Runops_Hook_hook)(pTHX);
static HV *Runops_Hook_op_counters;
@@ -30,7 +32,7 @@
#define ARITY_UNKNOWN 1 << 3
/* this is the modified runloop */
-int runops_hooked(pTHX)
+int runops_trace(pTHX)
{
while (PL_op) {
@@ -179,6 +181,9 @@
/* don't want to hook the hook */
Runops_Hook_disable();
+ /* make the environment as normal as possible for callbacks */
+ PL_runops = old_runops;
+
ENTER;
SAVETMPS;
@@ -262,6 +267,9 @@
FREETMPS;
LEAVE;
+ /* set up debugging again */
+ PL_runops = runops_trace;
+
Runops_Hook_enable();
return ret;
@@ -316,9 +324,11 @@
MODULE = Runops::Hook PACKAGE = Runops::Hook
+PROTOTYPES: ENABLE
+
BOOT:
Runops_Hook_clear_hook();
- PL_runops = runops_hooked;
+ PL_runops = runops_trace;
HV *
counters()
More information about the Jifty-commit
mailing list