This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate PL_* accessor functions under ithreads.
authorNicholas Clark <nick@ccl4.org>
Thu, 19 Aug 2010 14:54:12 +0000 (15:54 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 21 Sep 2010 10:28:07 +0000 (11:28 +0100)
commit87b9e16005b9e39b8a24388159e899fe54b95979
treea169b5176afb3e487997abf9759ba5ee0cc8af7f
parent4e9f151b596c7350249666fbb39df1a4283b8b9c
Eliminate PL_* accessor functions under ithreads.

When MULTIPLICITY was first developed, and interpreter state moved into an
interpreter struct, thread and interpreter local PL_* variables were defined
as macros that called accessor functions, returning the address of the value,
outside of the perl core. The intent was to allow members within the
interpreter struct to change size without breaking binary compatibility, so
that bug fixes could be merged to a maintenance branch that necessitated such
a size change.

However, some non-core code defines PERL_CORE, sometimes intentionally to
bypass this mechanism for speed reasons, sometimes for other reasons but with
the inadvertent side effect of bypassing this mechanism. As some of this code
is widespread in production use, the result is that the core *can't* change
the size of members of the interpreter struct, as it will break such modules
compiled against a previous release on that maintenance branch. The upshot
is that this mechanism is redundant, and well-behaved code is penalised by
it. Hence it can and should be removed.

Accessor functions are still needed for globals when PERL_GLOBAL_STRUCT is
defined.
embed.pl
makedef.pl
perlapi.c
perlapi.h