From: Nicholas Clark Date: Mon, 17 Sep 2007 21:07:33 +0000 (+0000) Subject: Remove dead functions: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=83029685b27ec04c6417a2eb865ffed0921d39ae;p=p5sagit%2Fp5-mst-13.2.git Remove dead functions: Perl_do_pipe, which is unused since 4.036 Perl_save_hints, which would just croak pp_threadsv, which was only used by 5.005 threads p4raw-id: //depot/perl@31889 --- diff --git a/embed.fnc b/embed.fnc index 395bd4d..3f012d2 100644 --- a/embed.fnc +++ b/embed.fnc @@ -229,7 +229,6 @@ Ap |bool |do_open9 |NN GV *gv|NN const char *name|I32 len|int as_raw \ Ap |bool |do_openn |NN GV *gv|NN const char *name|I32 len|int as_raw \ |int rawmode|int rawperm|NULLOK PerlIO *supplied_fp \ |NULLOK SV **svp|I32 num -p |void |do_pipe |NN SV* sv|NULLOK GV* rgv|NULLOK GV* wgv p |bool |do_print |NULLOK SV* sv|NN PerlIO* fp pR |OP* |do_readline p |I32 |do_chomp |NN SV* sv @@ -751,7 +750,6 @@ Ap |void |save_shared_pvref|NN char** str Ap |void |save_gp |NN GV* gv|I32 empty Ap |HV* |save_hash |NN GV* gv Ap |void |save_helem |NN HV* hv|NN SV *key|NN SV **sptr -Apr |void |save_hints Ap |void |save_hptr |NN HV** hptr Ap |void |save_I16 |NN I16* intp Ap |void |save_I32 |NN I32* intp diff --git a/embed.h b/embed.h index 6aaaf8a..18ab10b 100644 --- a/embed.h +++ b/embed.h @@ -210,7 +210,6 @@ #define do_open9 Perl_do_open9 #define do_openn Perl_do_openn #ifdef PERL_CORE -#define do_pipe Perl_do_pipe #define do_print Perl_do_print #define do_readline Perl_do_readline #define do_chomp Perl_do_chomp @@ -770,7 +769,6 @@ #define save_gp Perl_save_gp #define save_hash Perl_save_hash #define save_helem Perl_save_helem -#define save_hints Perl_save_hints #define save_hptr Perl_save_hptr #define save_I16 Perl_save_I16 #define save_I32 Perl_save_I32 @@ -2493,7 +2491,6 @@ #define do_open9(a,b,c,d,e,f,g,h,i) Perl_do_open9(aTHX_ a,b,c,d,e,f,g,h,i) #define do_openn(a,b,c,d,e,f,g,h,i) Perl_do_openn(aTHX_ a,b,c,d,e,f,g,h,i) #ifdef PERL_CORE -#define do_pipe(a,b,c) Perl_do_pipe(aTHX_ a,b,c) #define do_print(a,b) Perl_do_print(aTHX_ a,b) #define do_readline() Perl_do_readline(aTHX) #define do_chomp(a) Perl_do_chomp(aTHX_ a) @@ -3060,7 +3057,6 @@ #define save_gp(a,b) Perl_save_gp(aTHX_ a,b) #define save_hash(a) Perl_save_hash(aTHX_ a) #define save_helem(a,b,c) Perl_save_helem(aTHX_ a,b,c) -#define save_hints() Perl_save_hints(aTHX) #define save_hptr(a) Perl_save_hptr(aTHX_ a) #define save_I16(a) Perl_save_I16(aTHX_ a) #define save_I32(a) Perl_save_I32(aTHX_ a) diff --git a/mathoms.c b/mathoms.c index 05be2ba..a8a28e6 100644 --- a/mathoms.c +++ b/mathoms.c @@ -602,53 +602,6 @@ Perl_do_exec(pTHX_ const char *cmd) } #endif -#ifdef HAS_PIPE -void -Perl_do_pipe(pTHX_ SV *sv, GV *rgv, GV *wgv) -{ - dVAR; - register IO *rstio; - register IO *wstio; - int fd[2]; - - if (!rgv) - goto badexit; - if (!wgv) - goto badexit; - - rstio = GvIOn(rgv); - wstio = GvIOn(wgv); - - if (IoIFP(rstio)) - do_close(rgv,FALSE); - if (IoIFP(wstio)) - do_close(wgv,FALSE); - - if (PerlProc_pipe(fd) < 0) - goto badexit; - IoIFP(rstio) = PerlIO_fdopen(fd[0], "r"PIPE_OPEN_MODE); - IoOFP(wstio) = PerlIO_fdopen(fd[1], "w"PIPE_OPEN_MODE); - IoOFP(rstio) = IoIFP(rstio); - IoIFP(wstio) = IoOFP(wstio); - IoTYPE(rstio) = IoTYPE_RDONLY; - IoTYPE(wstio) = IoTYPE_WRONLY; - if (!IoIFP(rstio) || !IoOFP(wstio)) { - if (IoIFP(rstio)) PerlIO_close(IoIFP(rstio)); - else PerlLIO_close(fd[0]); - if (IoOFP(wstio)) PerlIO_close(IoOFP(wstio)); - else PerlLIO_close(fd[1]); - goto badexit; - } - - sv_setsv(sv,&PL_sv_yes); - return; - -badexit: - sv_setsv(sv,&PL_sv_undef); - return; -} -#endif - /* Backwards compatibility. */ int Perl_init_i18nl14n(pTHX_ int printwarn) @@ -656,13 +609,6 @@ Perl_init_i18nl14n(pTHX_ int printwarn) return init_i18nl10n(printwarn); } -/* XXX kept for BINCOMPAT only */ -void -Perl_save_hints(pTHX) -{ - Perl_croak(aTHX_ "internal error: obsolete function save_hints() called"); -} - OP * Perl_oopsCV(pTHX_ OP *o) { @@ -677,11 +623,6 @@ PP(pp_padany) DIE(aTHX_ "NOT IMPL LINE %d",__LINE__); } -PP(pp_threadsv) -{ - DIE(aTHX_ "tried to access per-thread data in non-threaded perl"); -} - PP(pp_mapstart) { DIE(aTHX_ "panic: mapstart"); /* uses grepstart */ diff --git a/proto.h b/proto.h index aa59c25..4c1e6a1 100644 --- a/proto.h +++ b/proto.h @@ -498,9 +498,6 @@ PERL_CALLCONV bool Perl_do_openn(pTHX_ GV *gv, const char *name, I32 len, int as __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); -PERL_CALLCONV void Perl_do_pipe(pTHX_ SV* sv, GV* rgv, GV* wgv) - __attribute__nonnull__(pTHX_1); - PERL_CALLCONV bool Perl_do_print(pTHX_ SV* sv, PerlIO* fp) __attribute__nonnull__(pTHX_2); @@ -2048,9 +2045,6 @@ PERL_CALLCONV void Perl_save_helem(pTHX_ HV* hv, SV *key, SV **sptr) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); -PERL_CALLCONV void Perl_save_hints(pTHX) - __attribute__noreturn__; - PERL_CALLCONV void Perl_save_hptr(pTHX_ HV** hptr) __attribute__nonnull__(pTHX_1);