This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Restore building with -DPERL_GLOBAL_STRUCT, broken since 4dc941f7cb795735.
authorNicholas Clark <nick@ccl4.org>
Thu, 28 Apr 2011 13:36:15 +0000 (14:36 +0100)
committerNicholas Clark <nick@ccl4.org>
Sun, 22 May 2011 20:02:40 +0000 (21:02 +0100)
As PL_charclass is a constant, it doesn't need to be accessed via the global
struct. It should be exported via globvar.sym, not PERLVARA() in perlvars.h

[With a PERVARA() it all compiles perfectly, once C<dVAR>s are added where
now needed, but the build loops forever because the (real) charclass array is
never initialised]

embedvar.h
globvar.sym
perlapi.h
perlvars.h

index bb179fd..85d7af5 100644 (file)
 #define PL_GYes                        (my_vars->GYes)
 #define PL_appctx              (my_vars->Gappctx)
 #define PL_Gappctx             (my_vars->Gappctx)
-#define PL_charclass           (my_vars->Gcharclass)
-#define PL_Gcharclass          (my_vars->Gcharclass)
 #define PL_check               (my_vars->Gcheck)
 #define PL_Gcheck              (my_vars->Gcheck)
 #define PL_csighandlerp                (my_vars->Gcsighandlerp)
 #define PL_GNo                 PL_No
 #define PL_GYes                        PL_Yes
 #define PL_Gappctx             PL_appctx
-#define PL_Gcharclass          PL_charclass
 #define PL_Gcheck              PL_check
 #define PL_Gcsighandlerp       PL_csighandlerp
 #define PL_Gcurinterp          PL_curinterp
index a4746d2..10ddaaf 100644 (file)
@@ -5,6 +5,7 @@
 
 bincompat_options
 block_type
+charclass
 check
 core_reg_engine
 fold
index d7d55d6..ddbb120 100644 (file)
--- a/perlapi.h
+++ b/perlapi.h
@@ -111,8 +111,6 @@ END_EXTERN_C
 #define PL_Yes                 (*Perl_GYes_ptr(NULL))
 #undef  PL_appctx
 #define PL_appctx              (*Perl_Gappctx_ptr(NULL))
-#undef  PL_charclass
-#define PL_charclass           (*Perl_Gcharclass_ptr(NULL))
 #undef  PL_check
 #define PL_check               (*Perl_Gcheck_ptr(NULL))
 #undef  PL_csighandlerp
index 1a44e22..87a0d8b 100644 (file)
@@ -116,7 +116,6 @@ PERLVAR(Gwatch_pvx, char*)
 PERLVAR(Gppaddr, Perl_ppaddr_t*) /* or opcode.h */
 PERLVAR(Gcheck,  Perl_check_t *) /* or opcode.h */
 PERLVARA(Gfold_locale, 256, unsigned char) /* or perl.h */
-PERLVARA(Gcharclass, 256, U32)
 #endif
 
 #ifdef PERL_NEED_APPCTX