summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-08-07 21:09:03 +0200
committerNicholas Clark <nick@ccl4.org>2011-08-11 11:38:46 +0200
commit115ff745268490ae5fb5ecaee00be54172e302e0 (patch)
tree18788de5ba03a4598d0cdd3b776e2dd257df050f /perl.c
parente469e61f2b416389b7fb67acaf0d21735066e6ee (diff)
downloadperl-115ff745268490ae5fb5ecaee00be54172e302e0.tar.gz
Simplify embedvar.h, removing a level of macro indirection for PL_* variables.
For the default (non-multiplicity) configuration, PERLVAR*() macros now directly expand their arguments to tokens such as C<PL_defgv>, instead of expanding to C<PL_Idefgv>. This removes over 350 lines from F<embedvar.h>, which defined macros to map from C<PL_Idefgv> to C<PL_defgv> and so forth.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/perl.c b/perl.c
index 1f69e05de2..736a055355 100644
--- a/perl.c
+++ b/perl.c
@@ -3480,14 +3480,14 @@ S_init_interp(pTHX)
{
dVAR;
#ifdef MULTIPLICITY
-# define PERLVAR(var,type)
-# define PERLVARA(var,n,type)
+# define PERLVAR(prefix,var,type)
+# define PERLVARA(prefix,var,n,type)
# if defined(PERL_IMPLICIT_CONTEXT)
-# define PERLVARI(var,type,init) aTHX->var = init;
-# define PERLVARIC(var,type,init) aTHX->var = init;
+# define PERLVARI(prefix,var,type,init) aTHX->prefix##var = init;
+# define PERLVARIC(prefix,var,type,init) aTHX->prefix##var = init;
# else
-# define PERLVARI(var,type,init) PERL_GET_INTERP->var = init;
-# define PERLVARIC(var,type,init) PERL_GET_INTERP->var = init;
+# define PERLVARI(prefix,var,type,init) PERL_GET_INTERP->var = init;
+# define PERLVARIC(prefix,var,type,init) PERL_GET_INTERP->var = init;
# endif
# include "intrpvar.h"
# undef PERLVAR
@@ -3495,10 +3495,10 @@ S_init_interp(pTHX)
# undef PERLVARI
# undef PERLVARIC
#else
-# define PERLVAR(var,type)
-# define PERLVARA(var,n,type)
-# define PERLVARI(var,type,init) PL_##var = init;
-# define PERLVARIC(var,type,init) PL_##var = init;
+# define PERLVAR(prefix,var,type)
+# define PERLVARA(prefix,var,n,type)
+# define PERLVARI(prefix,var,type,init) PL_##var = init;
+# define PERLVARIC(prefix,var,type,init) PL_##var = init;
# include "intrpvar.h"
# undef PERLVAR
# undef PERLVARA