summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-02 15:02:57 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-12 16:15:22 +0200
commitaf2f0da9b8621f5cc241f5664bcecd0fbd8865b2 (patch)
treee05689bfd8d8ef2202b400060568eb2cca0c0821
parent724cf8d623675450a9b7be794b6b3917972e83f8 (diff)
downloadperl-af2f0da9b8621f5cc241f5664bcecd0fbd8865b2.tar.gz
Move PL_runops_{std,dbg} to perl.h, and make them const.
They exist solely to ensure that Perl_runops_standard and Perl_runops_debug are linked in - nothing assigns to either variable, and nothing reads them.
-rw-r--r--embedvar.h6
-rw-r--r--globvar.sym2
-rw-r--r--perl.h8
-rw-r--r--perlapi.h4
-rw-r--r--perlvars.h6
5 files changed, 10 insertions, 16 deletions
diff --git a/embedvar.h b/embedvar.h
index 296a3b44e3..a540fd604f 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -751,10 +751,6 @@
#define PL_Gperlio_mutex (my_vars->Gperlio_mutex)
#define PL_ppaddr (my_vars->Gppaddr)
#define PL_Gppaddr (my_vars->Gppaddr)
-#define PL_runops_dbg (my_vars->Grunops_dbg)
-#define PL_Grunops_dbg (my_vars->Grunops_dbg)
-#define PL_runops_std (my_vars->Grunops_std)
-#define PL_Grunops_std (my_vars->Grunops_std)
#ifdef OS2
#define PL_sh_path (my_vars->Gsh_path)
#define PL_Gsh_path (my_vars->Gsh_path)
@@ -805,8 +801,6 @@
#define PL_Gperlio_fd_refcnt_size PL_perlio_fd_refcnt_size
#define PL_Gperlio_mutex PL_perlio_mutex
#define PL_Gppaddr PL_ppaddr
-#define PL_Grunops_dbg PL_runops_dbg
-#define PL_Grunops_std PL_runops_std
#ifdef OS2
#define PL_Gsh_path PL_sh_path
#endif
diff --git a/globvar.sym b/globvar.sym
index 81472f6150..b6a36ded94 100644
--- a/globvar.sym
+++ b/globvar.sym
@@ -45,6 +45,8 @@ regkind
reg_name
reg_extflags_name
revision
+runops_dbg
+runops_std
sig_name
sig_num
simple
diff --git a/perl.h b/perl.h
index fa86c7f854..b96cdcdefd 100644
--- a/perl.h
+++ b/perl.h
@@ -5049,6 +5049,14 @@ END_EXTERN_C
START_EXTERN_C
+/* dummy variables that hold pointers to both runops functions, thus forcing
+ * them *both* to get linked in (useful for Peek.xs, debugging etc) */
+
+EXTCONST runops_proc_t PL_runops_std
+ INIT(Perl_runops_standard);
+EXTCONST runops_proc_t PL_runops_dbg
+ INIT(Perl_runops_debug);
+
/* PERL_GLOBAL_STRUCT_PRIVATE wants to keep global data like the
* magic vtables const, but this is incompatible with SWIG which
* does want to modify the vtables. */
diff --git a/perlapi.h b/perlapi.h
index 9a82b180d0..a48abed4a7 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -141,10 +141,6 @@ END_EXTERN_C
#define PL_perlio_mutex (*Perl_Gperlio_mutex_ptr(NULL))
#undef PL_ppaddr
#define PL_ppaddr (*Perl_Gppaddr_ptr(NULL))
-#undef PL_runops_dbg
-#define PL_runops_dbg (*Perl_Grunops_dbg_ptr(NULL))
-#undef PL_runops_std
-#define PL_runops_std (*Perl_Grunops_std_ptr(NULL))
#undef PL_sh_path
#define PL_sh_path (*Perl_Gsh_path_ptr(NULL))
#undef PL_sig_defaulting
diff --git a/perlvars.h b/perlvars.h
index bf298c08b0..8ee418f5e2 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -139,12 +139,6 @@ PERLVAR(Gperlio_mutex, perl_mutex) /* Mutex for perlio fd refcounts */
* can be set atomically (ie not a bit field) */
PERLVARI(Gveto_cleanup, int, FALSE) /* exit without cleanup */
-/* dummy variables that hold pointers to both runops functions, thus forcing
- * them *both* to get linked in (useful for Peek.xs, debugging etc) */
-
-PERLVARI(Grunops_std, runops_proc_t, Perl_runops_standard)
-PERLVARI(Grunops_dbg, runops_proc_t, Perl_runops_debug)
-
/*
=for apidoc AmUx|Perl_keyword_plugin_t|PL_keyword_plugin