summaryrefslogtreecommitdiff
path: root/perlapi.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 /perlapi.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 'perlapi.c')
-rw-r--r--perlapi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/perlapi.c b/perlapi.c
index 6eab07cbc1..78583377a2 100644
--- a/perlapi.c
+++ b/perlapi.c
@@ -34,17 +34,17 @@
START_EXTERN_C
#undef PERLVARI
-#define PERLVARI(v,t,i) PERLVAR(v,t)
+#define PERLVARI(p,v,t,i) PERLVAR(p,v,t)
#undef PERLVAR
#undef PERLVARA
-#define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
+#define PERLVAR(p,v,t) t* Perl_##p##v##_ptr(pTHX) \
{ dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
-#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
+#define PERLVARA(p,v,n,t) PL_##v##_t* Perl_##p##v##_ptr(pTHX) \
{ dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
#undef PERLVARIC
-#define PERLVARIC(v,t,i) \
- const t* Perl_##v##_ptr(pTHX) \
+#define PERLVARIC(p,v,t,i) \
+ const t* Perl_##p##v##_ptr(pTHX) \
{ PERL_UNUSED_CONTEXT; return (const t *)&(PL_##v); }
#include "perlvars.h"