diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-04-30 23:01:07 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-06-12 16:15:21 +0200 |
commit | 58f645e20791a7788fcb38189895a712d5c53419 (patch) | |
tree | 768a485e3238e8b68abbf92cefed82fcb253b446 /regen/embed.pl | |
parent | 8790f825d5f6ff0beed9873a34e145cf35e3ce5c (diff) | |
download | perl-58f645e20791a7788fcb38189895a712d5c53419.tar.gz |
Move PL_{No,Yes,hexdigit} from perlvars.h to perl.h, as all are const char[]
They were converted in perl.h from const char[] to #define in 31fb120917c4f65d,
then re-instated as const char[], but in perlvars.h, in 3fe35a814d0a98f4.
There's no need for compile-time constants to jump through the hoops of
perlvars.h, even for Symbian, as the various "EXTCONST" variables already in
perl.h demonstrate.
These were the only 3 users of the the PERLVARISC macro, so eliminate that, and
all related code.
Diffstat (limited to 'regen/embed.pl')
-rwxr-xr-x | regen/embed.pl | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/regen/embed.pl b/regen/embed.pl index a72a0f7651..89b128e96c 100755 --- a/regen/embed.pl +++ b/regen/embed.pl @@ -367,7 +367,7 @@ sub readvars(\%$$@) { or die "embed.pl: Can't open $file: $!\n"; while (<FILE>) { s/[ \t]*#.*//; # Delete comments. - if (/PERLVARA?I?S?C?\($pre(\w+)/) { + if (/PERLVARA?I?C?\($pre(\w+)/) { my $sym = $1; $sym = $pre . $sym if $keep_pre; warn "duplicate symbol $sym while processing $file line $.\n" @@ -667,14 +667,11 @@ START_EXTERN_C #undef PERLVARA #undef PERLVARI #undef PERLVARIC -#undef PERLVARISC #define PERLVAR(v,t) EXTERN_C t* Perl_##v##_ptr(pTHX); #define PERLVARA(v,n,t) typedef t PL_##v##_t[n]; \ EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHX); #define PERLVARI(v,t,i) PERLVAR(v,t) #define PERLVARIC(v,t,i) PERLVAR(v, const t) -#define PERLVARISC(v,i) typedef const char PL_##v##_t[sizeof(i)]; \ - EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHX); #include "perlvars.h" @@ -682,7 +679,6 @@ START_EXTERN_C #undef PERLVARA #undef PERLVARI #undef PERLVARIC -#undef PERLVARISC END_EXTERN_C @@ -709,7 +705,6 @@ EXTCONST void * const PL_force_link_funcs[] = { #define PERLVARA(v,n,t) PERLVAR(v,t) #define PERLVARI(v,t,i) PERLVAR(v,t) #define PERLVARIC(v,t,i) PERLVAR(v,t) -#define PERLVARISC(v,i) PERLVAR(v,char) /* In Tru64 (__DEC && __osf__) the cc option -std1 causes that one * cannot cast between void pointers and function pointers without @@ -734,7 +729,6 @@ EXTCONST void * const PL_force_link_funcs[] = { #undef PERLVARA #undef PERLVARI #undef PERLVARIC -#undef PERLVARISC }; #endif /* DOINIT */ @@ -792,19 +786,15 @@ START_EXTERN_C #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \ { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); } #undef PERLVARIC -#undef PERLVARISC #define PERLVARIC(v,t,i) \ const t* Perl_##v##_ptr(pTHX) \ { PERL_UNUSED_CONTEXT; return (const t *)&(PL_##v); } -#define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \ - { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); } #include "perlvars.h" #undef PERLVAR #undef PERLVARA #undef PERLVARI #undef PERLVARIC -#undef PERLVARISC END_EXTERN_C |