-#ifndef LT_MULTIPLICITY
-# if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT)
-# define LT_MULTIPLICITY 1
-# else
-# define LT_MULTIPLICITY 0
-# endif
-#endif
-#if LT_MULTIPLICITY && !defined(tTHX)
-# define tTHX PerlInterpreter*
-#endif
-
-#if LT_MULTIPLICITY && defined(USE_ITHREADS) && defined(dMY_CXT) && defined(MY_CXT) && defined(START_MY_CXT) && defined(MY_CXT_INIT) && (defined(MY_CXT_CLONE) || defined(dMY_CXT_SV))
-# define LT_THREADSAFE 1
-# ifndef MY_CXT_CLONE
-# define MY_CXT_CLONE \
- dMY_CXT_SV; \
- my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1)); \
- Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t); \
- sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
-# endif
-#else
-# define LT_THREADSAFE 0
-# undef dMY_CXT
-# define dMY_CXT dNOOP
-# undef MY_CXT
-# define MY_CXT lt_globaldata
-# undef START_MY_CXT
-# define START_MY_CXT STATIC my_cxt_t MY_CXT;
-# undef MY_CXT_INIT
-# define MY_CXT_INIT NOOP
-# undef MY_CXT_CLONE
-# define MY_CXT_CLONE NOOP
-# undef pMY_CXT
-# define pMY_CXT
-# undef pMY_CXT_
-# define pMY_CXT_
-# undef aMY_CXT
-# define aMY_CXT
-# undef aMY_CXT_
-# define aMY_CXT_
-#endif
-
-/* --- Helpers ------------------------------------------------------------- */
-
-/* ... Thread-safe hints ................................................... */
-
-#if LT_WORKAROUND_REQUIRE_PROPAGATION
-
-typedef struct {
- SV *code;
- IV require_tag;
-} lt_hint_t;
-
-#define LT_HINT_STRUCT 1
-
-#define LT_HINT_CODE(H) ((H)->code)
-
-#define LT_HINT_FREE(H) { \
- lt_hint_t *h = (H); \
- SvREFCNT_dec(h->code); \
- PerlMemShared_free(h); \
-}
-
-#else /* LT_WORKAROUND_REQUIRE_PROPAGATION */
-
-typedef SV lt_hint_t;
-
-#define LT_HINT_STRUCT 0
-
-#define LT_HINT_CODE(H) (H)
-
-#define LT_HINT_FREE(H) SvREFCNT_dec(H);
-
-#endif /* !LT_WORKAROUND_REQUIRE_PROPAGATION */
-
-#if LT_THREADSAFE
-
-#define PTABLE_NAME ptable_hints
-#define PTABLE_VAL_FREE(V) LT_HINT_FREE(V)
-
-#define pPTBL pTHX
-#define pPTBL_ pTHX_
-#define aPTBL aTHX
-#define aPTBL_ aTHX_
-
-#include "ptable.h"
-
-#define ptable_hints_store(T, K, V) ptable_hints_store(aTHX_ (T), (K), (V))
-#define ptable_hints_free(T) ptable_hints_free(aTHX_ (T))
-
-#endif /* LT_THREADSAFE */
-
-/* ... Global data ......................................................... */
-
-#define MY_CXT_KEY __PACKAGE__ "::_guts" XS_VERSION
-
-typedef struct {
-#if LT_THREADSAFE
- ptable *tbl; /* It really is a ptable_hints */
- tTHX owner;
-#endif
- SV *default_meth;
- OP * (*pp_padsv_saved)(pTHX);
-} my_cxt_t;