perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <torsten.foert...@gmx.net>
Subject Seeking (Mod)Perl Wisdom
Date Fri, 28 Sep 2007 12:27:34 GMT
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

Mime
View raw message