#if LT_THREADSAFE
tTHX owner;
#endif
+ SV *default_meth;
OP * (*pp_padsv_saved)(pTHX);
} my_cxt_t;
* pp_padsv, but much less than if we would have set PL_ppaddr[OP_PADSV]
* globally. */
-STATIC SV *lt_default_meth = NULL;
-
STATIC OP *(*lt_old_ck_padany)(pTHX_ OP *) = 0;
STATIC OP *lt_ck_padany(pTHX_ OP *o) {
stash = PL_in_my_stash;
if (stash && (code = lt_hint())) {
SV *orig_pkg = newSVpvn(HvNAME_get(stash), HvNAMELEN_get(stash));
- SV *orig_meth = lt_default_meth;
+ SV *orig_meth = MY_CXT.default_meth;
SV *type_pkg = NULL;
SV *type_meth = NULL;
int items;
MY_CXT.owner = aTHX;
#endif
MY_CXT.pp_padsv_saved = 0;
+ MY_CXT.default_meth = newSVpvn("TYPEDSCALAR", 11);
+ SvREADONLY_on(MY_CXT.default_meth);
lt_op_map = ptable_new();
#ifdef USE_ITHREADS
MUTEX_INIT(<_op_map_mutex);
#endif
- lt_default_meth = newSVpvn("TYPEDSCALAR", 11);
- SvREADONLY_on(lt_default_meth);
-
PERL_HASH(lt_hash, __PACKAGE__, __PACKAGE_LEN__);
lt_old_ck_padany = PL_check[OP_PADANY];
PREINIT:
ptable *t;
int *level;
+ SV *cloned_default_meth;
CODE:
{
my_cxt_t ud;
ud.tbl = t = ptable_new();
ud.owner = MY_CXT.owner;
ptable_walk(MY_CXT.tbl, lt_ptable_hints_clone, &ud);
+ cloned_default_meth = lt_clone(MY_CXT.default_meth, MY_CXT.owner);
}
{
MY_CXT_CLONE;
MY_CXT.tbl = t;
MY_CXT.owner = aTHX;
MY_CXT.pp_padsv_saved = 0;
+ MY_CXT.default_meth = cloned_default_meth;
}
{
level = PerlMemShared_malloc(sizeof *level);