return cv;
}
-V *
+CV *
newXS(name, subaddr, filename)
char *name;
void (*subaddr) _((CV*));
PP(pp_specific)
{
-#ifdef USE_THREADS
dSP;
+#ifdef USE_THREADS
SV **svp = av_fetch(thr->magicals, op->op_targ, FALSE);
if (!svp)
croak("panic: pp_specific");
SV *varsv;
HV* stash;
GV *gv;
- BINOP myop;
SV *sv;
SV **mark = stack_base + ++*markstack_ptr; /* reuse in entersub */
I32 markoff = mark - stack_base - 1;
char *methname;
+#ifdef ORIGINAL_TIE
+ BINOP myop;
bool oldcatch = CATCH_GET;
+#endif
varsv = mark[0];
if (SvTYPE(varsv) == SVt_PVHV)
DIE("Can't locate object method \"%s\" via package \"%s\"",
methname, SvPV(mark[1],na));
+#ifdef ORIGINAL_TIE
Zero(&myop, 1, BINOP);
myop.op_last = (OP *) &myop;
myop.op_next = Nullop;
SPAGAIN;
CATCH_SET(oldcatch);
+#else
+ ENTER;
+ perl_call_sv((SV*)gv, G_SCALAR);
+ SPAGAIN;
+#endif
sv = TOPs;
if (sv_isobject(sv)) {
if (SvTYPE(varsv) == SVt_PVHV || SvTYPE(varsv) == SVt_PVAV) {
dPOPPOPssrl;
HV* stash;
GV *gv;
- BINOP myop;
SV *sv;
+#ifdef ORIGINAL_TIE
+ BINOP myop;
bool oldcatch = CATCH_GET;
+#endif
hv = (HV*)POPs;
DIE("No dbm on this machine");
}
+#ifdef ORIGINAL_TIE
Zero(&myop, 1, BINOP);
myop.op_last = (OP *) &myop;
myop.op_next = Nullop;
op->op_private |= OPpENTERSUB_DB;
PUTBACK;
pp_pushmark(ARGS);
-
+#else
+ ENTER;
+ PUSHMARK(sp);
+#endif
EXTEND(sp, 5);
PUSHs(sv);
PUSHs(left);
else
PUSHs(sv_2mortal(newSViv(O_RDWR)));
PUSHs(right);
+#ifdef ORIGINAL_TIE
PUSHs((SV*)GvCV(gv));
PUTBACK;
if (op = pp_entersub(ARGS))
runops();
+#else
+ PUTBACK;
+ perl_call_sv((SV*)gv, G_SCALAR);
+#endif
SPAGAIN;
if (!sv_isobject(TOPs)) {
sp--;
+#ifdef ORIGINAL_TIE
op = (OP *) &myop;
PUTBACK;
pp_pushmark(ARGS);
+#else
+ PUSHMARK(sp);
+#endif
PUSHs(sv);
PUSHs(left);
PUSHs(sv_2mortal(newSViv(O_RDONLY)));
PUSHs(right);
+#ifdef ORIGINAL_TIE
PUSHs((SV*)GvCV(gv));
+#endif
PUTBACK;
+#ifdef ORIGINAL_TIE
if (op = pp_entersub(ARGS))
runops();
+#else
+ perl_call_sv((SV*)gv, G_SCALAR);
+#endif
SPAGAIN;
}
+#ifdef ORIGINAL_TIE
CATCH_SET(oldcatch);
+#endif
if (sv_isobject(TOPs))
sv_magic((SV*)hv, TOPs, 'P', Nullch, 0);
LEAVE;
#define rs (thr->Trs)
#define last_in_gv (thr->Tlast_in_gv)
#define ofs (thr->Tofs)
+#define ofslen (thr->Tofslen)
#define defoutgv (thr->Tdefoutgv)
#define chopset (thr->Tchopset)
#define formtarget (thr->Tformtarget)
GV *gv;
CV *cv;
+#ifdef USE_THREADS
DEBUG_L(PerlIO_printf(PerlIO_stderr(),
"%p: die: curstack = %p, mainstack = %p\n",
thr, curstack, mainstack));
+#endif /* USE_THREADS */
/* We have to switch back to mainstack or die_where may try to pop
* the eval block from the wrong stack if die is being called from a
* signal handler. - dkindred@cs.cmu.edu */
message = mess(pat, &args);
va_end(args);
+#ifdef USE_THREADS
DEBUG_L(PerlIO_printf(PerlIO_stderr(),
"%p: die: message = %s\ndiehook = %p\n",
thr, message, diehook));
+#endif /* USE_THREADS */
if (diehook) {
/* sv_2cv might call croak() */
SV *olddiehook = diehook;
}
restartop = die_where(message);
+#ifdef USE_THREADS
DEBUG_L(PerlIO_printf(PerlIO_stderr(),
"%p: die: restartop = %p, was_in_eval = %d, oldrunlevel = %d\n",
thr, restartop, was_in_eval, oldrunlevel));
+#endif /* USE_THREADS */
if ((!restartop && was_in_eval) || oldrunlevel > 1)
JMPENV_JUMP(3);
return restartop;