diff options
-rw-r--r-- | embedvar.h | 12 | ||||
-rw-r--r-- | intrpvar.h | 9 | ||||
-rw-r--r-- | perlapi.h | 12 | ||||
-rw-r--r-- | perlvars.h | 9 | ||||
-rw-r--r-- | sv.c | 7 |
5 files changed, 28 insertions, 21 deletions
diff --git a/embedvar.h b/embedvar.h index c38840d297..7bf5499cfc 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 26b6104df6..5206c06ce9 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()! */ @@ -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 495aa11688..7d71787064 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 @@ -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; |