- CLONE_PARAMS params;
-#endif
-} indirect_ptable_clone_ud;
-
-#if I_HAS_PERL(5, 13, 2)
-# define indirect_ptable_clone_ud_init(U, T, O) \
- (U).tbl = (T); \
- (U).params = Perl_clone_params_new((O), aTHX)
-# define indirect_ptable_clone_ud_deinit(U) Perl_clone_params_del((U).params)
-# define indirect_dup_inc(S, U) SvREFCNT_inc(sv_dup((S), (U)->params))
-#else
-# define indirect_ptable_clone_ud_init(U, T, O) \
- (U).tbl = (T); \
- (U).params.stashes = newAV(); \
- (U).params.flags = 0; \
- (U).params.proto_perl = (O)
-# define indirect_ptable_clone_ud_deinit(U) SvREFCNT_dec((U).params.stashes)
-# define indirect_dup_inc(S, U) SvREFCNT_inc(sv_dup((S), &((U)->params)))
-#endif
-
-static void indirect_ptable_clone(pTHX_ ptable_ent *ent, void *ud_) {
- indirect_ptable_clone_ud *ud = ud_;
- indirect_hint_t *h1 = ent->val;
- indirect_hint_t *h2;
-
-#if I_HINT_STRUCT
-
- h2 = PerlMemShared_malloc(sizeof *h2);
- h2->code = indirect_dup_inc(h1->code, ud);
-#if I_WORKAROUND_REQUIRE_PROPAGATION
- h2->require_tag = PTR2IV(indirect_dup_inc(INT2PTR(SV *, h1->require_tag), ud));
-#endif
-
-#else /* I_HINT_STRUCT */
-
- h2 = indirect_dup_inc(h1, ud);
-
-#endif /* !I_HINT_STRUCT */
-
- ptable_hints_store(ud->tbl, ent->key, h2);
-}
-
-static void indirect_thread_cleanup(pTHX_ void *ud) {
- dMY_CXT;
-
- SvREFCNT_dec(MY_CXT.global_code);
- MY_CXT.global_code = NULL;
- ptable_free(MY_CXT.map);
- MY_CXT.map = NULL;
- ptable_hints_free(MY_CXT.tbl);
- MY_CXT.tbl = NULL;
-}
-
-static int indirect_endav_free(pTHX_ SV *sv, MAGIC *mg) {
- SAVEDESTRUCTOR_X(indirect_thread_cleanup, NULL);
-
- return 0;
-}
-
-static MGVTBL indirect_endav_vtbl = {
- 0,
- 0,
- 0,
- 0,
- indirect_endav_free
-#if MGf_COPY
- , 0
-#endif
-#if MGf_DUP
- , 0