perl-Coro/perl-Coro-6.511-perl-5.24.patch

14 lines
732 B
Diff

--- a/Coro/State.xs
+++ b/Coro/State.xs
@@ -1412,7 +1412,11 @@
PUSHMARK (SP);
PUSHs (&PL_sv_yes);
PUSHs (fullname);
+# if PERL_VERSION_ATLEAST(5,24,0)
+ PUSHs (CxHASARGS (cx) ? sv_2mortal (newRV_inc (PL_curpad[0])) : &PL_sv_undef);
+#else
PUSHs (CxHASARGS (cx) ? sv_2mortal (newRV_inc ((SV *)cx->blk_sub.argarray)) : &PL_sv_undef);
+#endif
PUTBACK;
cb = hv_fetch ((HV *)SvRV (coro_current), "_trace_sub_cb", sizeof ("_trace_sub_cb") - 1, 0);
if (cb) call_sv (*cb, G_KEEPERR | G_EVAL | G_VOID | G_DISCARD);