This is necessary for XS extensions that define PERL_CORE. In that
situation PERL_GET_CONTEXT will resolve to PL_curinterp, which is
normally not exported (extensions call Perl_Gcurinterp_ptr() to get a
pointer to PL_curinterp instead). With USE_ITHREADS defined
PERL_GET_CONTEXT will expand to Perl_get_context() even inside the
core because the context needs to be fetched from threadlocal storage.
my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
emit_symbols $glob;
}
+ unless ($define{'USE_ITHREADS'}) {
+ # XXX needed for XS extensions that define PERL_CORE
+ emit_symbol("PL_curinterp");
+ }
# XXX AIX seems to want the perlvars.h symbols, for some reason
if ($PLATFORM eq 'aix' or $PLATFORM eq 'os2') { # OS/2 needs PL_thr_key
my $glob = readvar($perlvars_h);