Permalink
Browse files

Simplify embedvar.h, removing a level of macro indirection for PL_* v…

…ariables.

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.
  • Loading branch information...
1 parent e469e61 commit 115ff745268490ae5fb5ecaee00be54172e302e0 Nicholas Clark committed Aug 7, 2011
Showing with 459 additions and 846 deletions.
  1. +4 −4 NetWare/interface.c
  2. +4 −4 NetWare/interface.cpp
  3. +1 −1 cpan/Devel-PPPort/parts/inc/variables
  4. +0 −369 embedvar.h
  5. +1 −1 ext/B/B.pm
  6. +16 −16 ext/B/B.xs
  7. +329 −328 intrpvar.h
  8. +1 −1 makedef.pl
  9. +10 −10 perl.c
  10. +8 −8 perl.h
  11. +5 −5 perlapi.c
  12. +9 −9 perlapi.h
  13. +35 −33 perlvars.h
  14. +13 −1 pod/perldelta.pod
  15. +15 −48 regen/embed.pl
  16. +4 −4 util.c
  17. +4 −4 win32/perllib.c
View
@@ -126,10 +126,10 @@ int RunPerl(int argc, char **argv, char **env)
PerlInterpreter *new_perl = NULL; // defined in Perl.h
#ifdef PERL_GLOBAL_STRUCT
- #define PERLVAR(var,type)
- #define PERLVARA(var,type)
- #define PERLVARI(var,type,init) PL_Vars.var = init;
- #define PERLVARIC(var,type,init) PL_Vars.var = init;
+ #define PERLVAR(prefix,var,type)
+ #define PERLVARA(prefix,var,type)
+ #define PERLVARI(prefix,var,type,init) PL_Vars.prefix##var = init;
+ #define PERLVARIC(prefix,var,type,init) PL_Vars.prefix##var = init;
#include "perlvars.h"
View
@@ -120,10 +120,10 @@ int RunPerl(int argc, char **argv, char **env)
//__asm{int 3};
#ifdef PERL_GLOBAL_STRUCT
- #define PERLVAR(var,type)
- #define PERLVARA(var,type)
- #define PERLVARI(var,type,init) PL_Vars.var = init;
- #define PERLVARIC(var,type,init) PL_Vars.var = init;
+ #define PERLVAR(prefix,var,type)
+ #define PERLVARA(prefix,var,type)
+ #define PERLVARI(prefix,var,type,init) PL_Vars.prefix##var = init;
+ #define PERLVARIC(prefix,var,type,init) PL_Vars.prefix##var = init;
#include "perlvars.h"
@@ -383,7 +383,7 @@ other_variables()
ppp_TESTVAR(PL_debstash);
ppp_TESTVAR(PL_defgv);
ppp_TESTVAR(PL_diehook);
-#if defined(PL_phase) || defined(PL_Iphase)
+#if PERL_VERSION >= 14
ppp_PARSERVAR_dummy;
#else
ppp_TESTVAR(PL_dirty);
Oops, something went wrong.

0 comments on commit 115ff74

Please sign in to comment.