From: Gurusamy Sarathy Date: Tue, 4 Jul 2000 04:59:35 +0000 (+0000) Subject: adjust change#6299 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3dbbd0f5d38d873da0cc4a01718eb88e4dc6ae89;p=p5sagit%2Fp5-mst-13.2.git adjust change#6299 p4raw-link: @6299 on //depot/perl: 6c644e7885bc20d759d8cbcb4abaa8f14113c03b p4raw-id: //depot/perl@6302 --- diff --git a/embed.h b/embed.h index 301619e..ed1f34e 100644 --- a/embed.h +++ b/embed.h @@ -825,15 +825,17 @@ #define mg_dup Perl_mg_dup #define sv_dup Perl_sv_dup #if defined(HAVE_INTERP_INTERN) -#define sys_intern_clear Perl_sys_intern_clear #define sys_intern_dup Perl_sys_intern_dup -#define sys_intern_init Perl_sys_intern_init #endif #define ptr_table_new Perl_ptr_table_new #define ptr_table_fetch Perl_ptr_table_fetch #define ptr_table_store Perl_ptr_table_store #define ptr_table_split Perl_ptr_table_split #endif +#if defined(HAVE_INTERP_INTERN) +#define sys_intern_clear Perl_sys_intern_clear +#define sys_intern_init Perl_sys_intern_init +#endif #if defined(PERL_OBJECT) #else #endif @@ -2265,15 +2267,17 @@ #define mg_dup(a) Perl_mg_dup(aTHX_ a) #define sv_dup(a) Perl_sv_dup(aTHX_ a) #if defined(HAVE_INTERP_INTERN) -#define sys_intern_clear() Perl_sys_intern_clear(aTHX) #define sys_intern_dup(a,b) Perl_sys_intern_dup(aTHX_ a,b) -#define sys_intern_init() Perl_sys_intern_init(aTHX) #endif #define ptr_table_new() Perl_ptr_table_new(aTHX) #define ptr_table_fetch(a,b) Perl_ptr_table_fetch(aTHX_ a,b) #define ptr_table_store(a,b,c) Perl_ptr_table_store(aTHX_ a,b,c) #define ptr_table_split(a) Perl_ptr_table_split(aTHX_ a) #endif +#if defined(HAVE_INTERP_INTERN) +#define sys_intern_clear() Perl_sys_intern_clear(aTHX) +#define sys_intern_init() Perl_sys_intern_init(aTHX) +#endif #if defined(PERL_OBJECT) #else #endif @@ -4441,12 +4445,8 @@ #define Perl_sv_dup CPerlObj::Perl_sv_dup #define sv_dup Perl_sv_dup #if defined(HAVE_INTERP_INTERN) -#define Perl_sys_intern_clear CPerlObj::Perl_sys_intern_clear -#define sys_intern_clear Perl_sys_intern_clear #define Perl_sys_intern_dup CPerlObj::Perl_sys_intern_dup #define sys_intern_dup Perl_sys_intern_dup -#define Perl_sys_intern_init CPerlObj::Perl_sys_intern_init -#define sys_intern_init Perl_sys_intern_init #endif #define Perl_ptr_table_new CPerlObj::Perl_ptr_table_new #define ptr_table_new Perl_ptr_table_new @@ -4457,6 +4457,12 @@ #define Perl_ptr_table_split CPerlObj::Perl_ptr_table_split #define ptr_table_split Perl_ptr_table_split #endif +#if defined(HAVE_INTERP_INTERN) +#define Perl_sys_intern_clear CPerlObj::Perl_sys_intern_clear +#define sys_intern_clear Perl_sys_intern_clear +#define Perl_sys_intern_init CPerlObj::Perl_sys_intern_init +#define sys_intern_init Perl_sys_intern_init +#endif #if defined(PERL_OBJECT) #else #endif diff --git a/embed.pl b/embed.pl index d760576..0859a67 100755 --- a/embed.pl +++ b/embed.pl @@ -2155,16 +2155,18 @@ Ap |GP* |gp_dup |GP* gp Ap |MAGIC* |mg_dup |MAGIC* mg Ap |SV* |sv_dup |SV* sstr #if defined(HAVE_INTERP_INTERN) -Ap |void |sys_intern_clear Ap |void |sys_intern_dup |struct interp_intern* src \ |struct interp_intern* dst -Ap |void |sys_intern_init #endif Ap |PTR_TBL_t*|ptr_table_new Ap |void* |ptr_table_fetch|PTR_TBL_t *tbl|void *sv Ap |void |ptr_table_store|PTR_TBL_t *tbl|void *oldsv|void *newsv Ap |void |ptr_table_split|PTR_TBL_t *tbl #endif +#if defined(HAVE_INTERP_INTERN) +Ap |void |sys_intern_clear +Ap |void |sys_intern_init +#endif #if defined(PERL_OBJECT) protected: diff --git a/global.sym b/global.sym index 15afc0c..9053446 100644 --- a/global.sym +++ b/global.sym @@ -536,10 +536,10 @@ Perl_dirp_dup Perl_gp_dup Perl_mg_dup Perl_sv_dup -Perl_sys_intern_clear Perl_sys_intern_dup -Perl_sys_intern_init Perl_ptr_table_new Perl_ptr_table_fetch Perl_ptr_table_store Perl_ptr_table_split +Perl_sys_intern_clear +Perl_sys_intern_init diff --git a/objXSUB.h b/objXSUB.h index 7f14e2f..b5ee212 100644 --- a/objXSUB.h +++ b/objXSUB.h @@ -2166,18 +2166,10 @@ #undef sv_dup #define sv_dup Perl_sv_dup #if defined(HAVE_INTERP_INTERN) -#undef Perl_sys_intern_clear -#define Perl_sys_intern_clear pPerl->Perl_sys_intern_clear -#undef sys_intern_clear -#define sys_intern_clear Perl_sys_intern_clear #undef Perl_sys_intern_dup #define Perl_sys_intern_dup pPerl->Perl_sys_intern_dup #undef sys_intern_dup #define sys_intern_dup Perl_sys_intern_dup -#undef Perl_sys_intern_init -#define Perl_sys_intern_init pPerl->Perl_sys_intern_init -#undef sys_intern_init -#define sys_intern_init Perl_sys_intern_init #endif #undef Perl_ptr_table_new #define Perl_ptr_table_new pPerl->Perl_ptr_table_new @@ -2196,6 +2188,16 @@ #undef ptr_table_split #define ptr_table_split Perl_ptr_table_split #endif +#if defined(HAVE_INTERP_INTERN) +#undef Perl_sys_intern_clear +#define Perl_sys_intern_clear pPerl->Perl_sys_intern_clear +#undef sys_intern_clear +#define sys_intern_clear Perl_sys_intern_clear +#undef Perl_sys_intern_init +#define Perl_sys_intern_init pPerl->Perl_sys_intern_init +#undef sys_intern_init +#define sys_intern_init Perl_sys_intern_init +#endif #if defined(PERL_OBJECT) #else #endif diff --git a/perlapi.c b/perlapi.c index 6a2b5b0..0f25e4d 100644 --- a/perlapi.c +++ b/perlapi.c @@ -3914,26 +3914,12 @@ Perl_sv_dup(pTHXo_ SV* sstr) } #if defined(HAVE_INTERP_INTERN) -#undef Perl_sys_intern_clear -void -Perl_sys_intern_clear(pTHXo) -{ - ((CPerlObj*)pPerl)->Perl_sys_intern_clear(); -} - #undef Perl_sys_intern_dup void Perl_sys_intern_dup(pTHXo_ struct interp_intern* src, struct interp_intern* dst) { ((CPerlObj*)pPerl)->Perl_sys_intern_dup(src, dst); } - -#undef Perl_sys_intern_init -void -Perl_sys_intern_init(pTHXo) -{ - ((CPerlObj*)pPerl)->Perl_sys_intern_init(); -} #endif #undef Perl_ptr_table_new @@ -3964,6 +3950,22 @@ Perl_ptr_table_split(pTHXo_ PTR_TBL_t *tbl) ((CPerlObj*)pPerl)->Perl_ptr_table_split(tbl); } #endif +#if defined(HAVE_INTERP_INTERN) + +#undef Perl_sys_intern_clear +void +Perl_sys_intern_clear(pTHXo) +{ + ((CPerlObj*)pPerl)->Perl_sys_intern_clear(); +} + +#undef Perl_sys_intern_init +void +Perl_sys_intern_init(pTHXo) +{ + ((CPerlObj*)pPerl)->Perl_sys_intern_init(); +} +#endif #if defined(PERL_OBJECT) #else #endif diff --git a/proto.h b/proto.h index da7d9bc..e16fcd6 100644 --- a/proto.h +++ b/proto.h @@ -933,15 +933,17 @@ PERL_CALLCONV GP* Perl_gp_dup(pTHX_ GP* gp); PERL_CALLCONV MAGIC* Perl_mg_dup(pTHX_ MAGIC* mg); PERL_CALLCONV SV* Perl_sv_dup(pTHX_ SV* sstr); #if defined(HAVE_INTERP_INTERN) -PERL_CALLCONV void Perl_sys_intern_clear(pTHX); PERL_CALLCONV void Perl_sys_intern_dup(pTHX_ struct interp_intern* src, struct interp_intern* dst); -PERL_CALLCONV void Perl_sys_intern_init(pTHX); #endif PERL_CALLCONV PTR_TBL_t* Perl_ptr_table_new(pTHX); PERL_CALLCONV void* Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, void *sv); PERL_CALLCONV void Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, void *oldsv, void *newsv); PERL_CALLCONV void Perl_ptr_table_split(pTHX_ PTR_TBL_t *tbl); #endif +#if defined(HAVE_INTERP_INTERN) +PERL_CALLCONV void Perl_sys_intern_clear(pTHX); +PERL_CALLCONV void Perl_sys_intern_init(pTHX); +#endif #if defined(PERL_OBJECT) protected: diff --git a/win32/win32.c b/win32/win32.c index 750f6fb..1ba2e51 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4054,6 +4054,18 @@ Perl_sys_intern_init(pTHX) w32_init_socktype = 0; } +void +Perl_sys_intern_clear(pTHX) +{ + Safefree(w32_perlshell_tokens); + Safefree(w32_perlshell_vec); + /* NOTE: w32_fdpid is freed by sv_clean_all() */ + Safefree(w32_children); +# ifdef USE_ITHREADS + Safefree(w32_pseudo_children); +# endif +} + # ifdef USE_ITHREADS void @@ -4068,18 +4080,6 @@ Perl_sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst) Newz(1313, dst->pseudo_children, 1, child_tab); dst->thr_intern.Winit_socktype = src->thr_intern.Winit_socktype; } - -void -Perl_sys_intern_clear(pTHX) -{ - Safefree(w32_perlshell_tokens); - Safefree(w32_perlshell_vec); - /* NOTE: w32_fdpid is freed by sv_clean_all() */ - Safefree(w32_children); -# ifdef USE_ITHREADS - Safefree(w32_pseudo_children); -# endif -} # endif /* USE_ITHREADS */ #endif /* HAVE_INTERP_INTERN */