Hi,

the a pointer to current interpreter is somehow written to the Perl 
interpreter itself by this macro:

#ifndef HvPMROOT
# if MP_PERL_VERSION_AT_LEAST(5, 9, 5)
#define MP_THX_INTERP_SET(thx, interp)                          \
    ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_u.xmg_magic = 
(MAGIC*)interp
# else
#define MP_THX_INTERP_SET(thx, interp)                          \
    ((XPVMG*)SvANY(*Perl_Imodglobal_ptr(thx)))->xmg_magic = (MAGIC*)interp
# endif
#else
#define MP_THX_INTERP_SET(thx, interp)                          \
    HvPMROOT(*Perl_Imodglobal_ptr(thx)) = (PMOP*)interp
#endif

What is HvPMROOT and what is Perl_Imodglobal_ptr? Are these normal Perl 
variables that can also be accessed from Perl level? If not why are here 
special variables used? Can that not be something like 
$Modperl::CurrentInterpreter or so?

Torsten

Attachment: pgpgwBcCRDrl0.pgp
Description: PGP signature

Reply via email to