diff options
Diffstat (limited to 'ext/XS/APItest/APItest.xs')
-rw-r--r-- | ext/XS/APItest/APItest.xs | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/ext/XS/APItest/APItest.xs b/ext/XS/APItest/APItest.xs index 5ea6f4f060..4e84816c1d 100644 --- a/ext/XS/APItest/APItest.xs +++ b/ext/XS/APItest/APItest.xs @@ -30,14 +30,17 @@ my_cxt_setint_p(pMY_CXT_ int i) } SV* -my_cxt_getsv_interp(void) +my_cxt_getsv_interp_context(void) { -#ifdef PERL_IMPLICIT_CONTEXT dTHX; dMY_CXT_INTERP(my_perl); -#else + return MY_CXT.sv; +} + +SV* +my_cxt_getsv_interp(void) +{ dMY_CXT; -#endif return MY_CXT.sv; } @@ -404,6 +407,8 @@ fetch(hash, key_sv) OUTPUT: RETVAL +#if defined (hv_common) + SV * common(params) INPUT: @@ -449,6 +454,8 @@ common(params) OUTPUT: RETVAL +#endif + void test_hv_free_ent() PPCODE: @@ -479,6 +486,8 @@ test_share_unshare_pvn(input) OUTPUT: RETVAL +#if PERL_VERSION >= 9 + bool refcounted_he_exists(key, level=0) SV *key @@ -493,7 +502,6 @@ refcounted_he_exists(key, level=0) OUTPUT: RETVAL - SV * refcounted_he_fetch(key, level=0) SV *key @@ -508,6 +516,7 @@ refcounted_he_fetch(key, level=0) OUTPUT: RETVAL +#endif =pod @@ -781,10 +790,11 @@ my_cxt_setint(i) my_cxt_setint_p(aMY_CXT_ i); void -my_cxt_getsv() +my_cxt_getsv(how) + bool how; PPCODE: EXTEND(SP, 1); - ST(0) = my_cxt_getsv_interp(); + ST(0) = how ? my_cxt_getsv_interp_context() : my_cxt_getsv_interp(); XSRETURN(1); void |