From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Mon, 12 May 2003 04:49:57 +0000 (+0000)
Subject: More moves to intrpvar.h.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bce260cd95d1dd29e348f40a7f6682c3d7fea3fc;p=p5sagit%2Fp5-mst-13.2.git

More moves to intrpvar.h.

p4raw-id: //depot/perl@19499
---

diff --git a/embedvar.h b/embedvar.h
index c38840d..7bf5499 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -350,6 +350,7 @@
 #define PL_perldb		(vTHX->Iperldb)
 #define PL_perlio		(vTHX->Iperlio)
 #define PL_pidstatus		(vTHX->Ipidstatus)
+#define PL_ppid			(vTHX->Ippid)
 #define PL_preambleav		(vTHX->Ipreambleav)
 #define PL_preambled		(vTHX->Ipreambled)
 #define PL_preprocess		(vTHX->Ipreprocess)
@@ -366,6 +367,8 @@
 #define PL_rsfp			(vTHX->Irsfp)
 #define PL_rsfp_filters		(vTHX->Irsfp_filters)
 #define PL_runops		(vTHX->Irunops)
+#define PL_runops_dbg		(vTHX->Irunops_dbg)
+#define PL_runops_std		(vTHX->Irunops_std)
 #define PL_savebegin		(vTHX->Isavebegin)
 #define PL_sawampersand		(vTHX->Isawampersand)
 #define PL_sh_path_compat	(vTHX->Ish_path_compat)
@@ -648,6 +651,7 @@
 #define PL_Iperldb		PL_perldb
 #define PL_Iperlio		PL_perlio
 #define PL_Ipidstatus		PL_pidstatus
+#define PL_Ippid		PL_ppid
 #define PL_Ipreambleav		PL_preambleav
 #define PL_Ipreambled		PL_preambled
 #define PL_Ipreprocess		PL_preprocess
@@ -664,6 +668,8 @@
 #define PL_Irsfp		PL_rsfp
 #define PL_Irsfp_filters	PL_rsfp_filters
 #define PL_Irunops		PL_runops
+#define PL_Irunops_dbg		PL_runops_dbg
+#define PL_Irunops_std		PL_runops_std
 #define PL_Isavebegin		PL_savebegin
 #define PL_Isawampersand	PL_sawampersand
 #define PL_Ish_path_compat	PL_sh_path_compat
@@ -891,9 +897,6 @@
 #define PL_malloc_mutex		(PL_Vars.Gmalloc_mutex)
 #define PL_op_mutex		(PL_Vars.Gop_mutex)
 #define PL_patleave		(PL_Vars.Gpatleave)
-#define PL_ppid			(PL_Vars.Gppid)
-#define PL_runops_dbg		(PL_Vars.Grunops_dbg)
-#define PL_runops_std		(PL_Vars.Grunops_std)
 #define PL_sh_path		(PL_Vars.Gsh_path)
 #define PL_thr_key		(PL_Vars.Gthr_key)
 
@@ -908,9 +911,6 @@
 #define PL_Gmalloc_mutex	PL_malloc_mutex
 #define PL_Gop_mutex		PL_op_mutex
 #define PL_Gpatleave		PL_patleave
-#define PL_Gppid		PL_ppid
-#define PL_Grunops_dbg		PL_runops_dbg
-#define PL_Grunops_std		PL_runops_std
 #define PL_Gsh_path		PL_sh_path
 #define PL_Gthr_key		PL_thr_key
 
diff --git a/intrpvar.h b/intrpvar.h
index 26b6104..5206c06 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -514,6 +514,15 @@ PERLVARI(Ilockhook,	share_proc_t,	MEMBER_TO_FPTR(Perl_sv_nolocking))
 PERLVARI(Iunlockhook,	share_proc_t,	MEMBER_TO_FPTR(Perl_sv_nounlocking))
 PERLVARI(Ithreadhook,	thrhook_proc_t,	MEMBER_TO_FPTR(Perl_nothreadhook))
 
+/* Force inclusion of both runops options */
+PERLVARI(Irunops_std,	runops_proc_t,	MEMBER_TO_FPTR(Perl_runops_standard))
+PERLVARI(Irunops_dbg,	runops_proc_t,	MEMBER_TO_FPTR(Perl_runops_debug))
+
+/* Stores the PPID */
+#ifdef THREADS_HAVE_PIDS
+PERLVARI(Ippid,		IV,		0)
+#endif
+
 PERLVAR(IDBassertion,   SV *)
 
 /* Don't forget to add your variable also to perl_clone()! */
diff --git a/perlapi.h b/perlapi.h
index 4e6bd10..b4c8287 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -458,6 +458,8 @@ END_EXTERN_C
 #define PL_perlio		(*Perl_Iperlio_ptr(aTHX))
 #undef  PL_pidstatus
 #define PL_pidstatus		(*Perl_Ipidstatus_ptr(aTHX))
+#undef  PL_ppid
+#define PL_ppid			(*Perl_Ippid_ptr(aTHX))
 #undef  PL_preambleav
 #define PL_preambleav		(*Perl_Ipreambleav_ptr(aTHX))
 #undef  PL_preambled
@@ -490,6 +492,10 @@ END_EXTERN_C
 #define PL_rsfp_filters		(*Perl_Irsfp_filters_ptr(aTHX))
 #undef  PL_runops
 #define PL_runops		(*Perl_Irunops_ptr(aTHX))
+#undef  PL_runops_dbg
+#define PL_runops_dbg		(*Perl_Irunops_dbg_ptr(aTHX))
+#undef  PL_runops_std
+#define PL_runops_std		(*Perl_Irunops_std_ptr(aTHX))
 #undef  PL_savebegin
 #define PL_savebegin		(*Perl_Isavebegin_ptr(aTHX))
 #undef  PL_sawampersand
@@ -932,12 +938,6 @@ END_EXTERN_C
 #define PL_op_mutex		(*Perl_Gop_mutex_ptr(NULL))
 #undef  PL_patleave
 #define PL_patleave		(*Perl_Gpatleave_ptr(NULL))
-#undef  PL_ppid
-#define PL_ppid			(*Perl_Gppid_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_thr_key
diff --git a/perlvars.h b/perlvars.h
index 495aa11..7d71787 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -48,15 +48,6 @@ PERLVAR(Gmalloc_mutex,	perl_mutex)	/* Mutex for malloc */
 PERLVAR(Gop_mutex,	perl_mutex)	/* Mutex for op refcounting */
 #endif
 
-/* Force inclusion of both runops options */
-PERLVARI(Grunops_std,	runops_proc_t,	MEMBER_TO_FPTR(Perl_runops_standard))
-PERLVARI(Grunops_dbg,	runops_proc_t,	MEMBER_TO_FPTR(Perl_runops_debug))
-
-/* Stores the PPID */
-#ifdef THREADS_HAVE_PIDS
-PERLVARI(Gppid,		IV,		0)
-#endif
-
 #ifdef USE_ITHREADS
 PERLVAR(Gdollarzero_mutex, perl_mutex)	/* Modifying $0 */
 #endif
diff --git a/sv.c b/sv.c
index 131450d..423bb04 100644
--- a/sv.c
+++ b/sv.c
@@ -11223,6 +11223,13 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_unlockhook	= proto_perl->Iunlockhook;
     PL_threadhook	= proto_perl->Ithreadhook;
 
+    PL_runops_std	= proto_perl->Irunops_std;
+    PL_runops_dbg	= proto_perl->Irunops_dbg;
+
+#ifdef THREADS_HAVE_PIDS
+    PL_ppid		= proto_perl->Ippid;
+#endif
+
     /* swatch cache */
     PL_last_swash_hv	= Nullhv;	/* reinits on demand */
     PL_last_swash_klen	= 0;