From: Gurusamy Sarathy Date: Thu, 18 Jun 1998 19:37:41 +0000 (+0000) Subject: back out problematic change#1105, tweak perlsub.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=227a8b4b89a56a5f0c4892bc310a24a6cfceb3b7;p=p5sagit%2Fp5-mst-13.2.git back out problematic change#1105, tweak perlsub.pod p4raw-link: @1105 on //depot/perl: e2d46a1de163ba101bb4392a8fa6d97ca3c9a323 p4raw-id: //depot/perl@1146 --- diff --git a/embed.h b/embed.h index c5b537e..9768718 100644 --- a/embed.h +++ b/embed.h @@ -325,7 +325,6 @@ #define magic_setuvar Perl_magic_setuvar #define magic_setvec Perl_magic_setvec #define magic_sizepack Perl_magic_sizepack -#define magic_unchain Perl_magic_unchain #define magic_wipepack Perl_magic_wipepack #define magicname Perl_magicname #define markstack_grow Perl_markstack_grow diff --git a/global.sym b/global.sym index 9b3308f..5001c3c 100644 --- a/global.sym +++ b/global.sym @@ -425,7 +425,6 @@ magic_settaint magic_setuvar magic_setvec magic_sizepack -magic_unchain magic_wipepack magicname markstack_grow diff --git a/mg.c b/mg.c index b981c12..d6ea1d2 100644 --- a/mg.c +++ b/mg.c @@ -1511,13 +1511,6 @@ magic_freeregexp(SV *sv, MAGIC *mg) return 0; } -int -magic_unchain(SV *sv, MAGIC *mg) -{ - sv_unmagic(sv, mg->mg_type); - return 0; -} - #ifdef USE_LOCALE_COLLATE int magic_setcollxfrm(SV *sv, MAGIC *mg) diff --git a/perl.h b/perl.h index 60f7dd5..c8bd8b5 100644 --- a/perl.h +++ b/perl.h @@ -2041,7 +2041,7 @@ EXT MGVTBL vtbl_mutex = {0, 0, 0, 0, magic_mutexfree}; EXT MGVTBL vtbl_defelem = {magic_getdefelem,magic_setdefelem, 0, 0, magic_freedefelem}; -EXT MGVTBL vtbl_regexp = {0,magic_unchain,0,0, magic_freeregexp}; +EXT MGVTBL vtbl_regexp = {0,0,0,0, magic_freeregexp}; #ifdef USE_LOCALE_COLLATE EXT MGVTBL vtbl_collxfrm = {0, diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 5baff89..392323a 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -1065,7 +1065,7 @@ that understands regular expressions. my $pat = shift; my @got; local(*D); - if (opendir D, '.') { @got = grep /$pat/o, readdir D; closedir D; } + if (opendir D, '.') { @got = grep /$pat/, readdir D; closedir D; } @got; } 1; diff --git a/pp_ctl.c b/pp_ctl.c index 9b924bc..444036e 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -76,8 +76,8 @@ PP(pp_regcomp) { MAGIC *mg = Null(MAGIC*); tmpstr = POPs; - if(SvROK(tmpstr) || SvRMAGICAL(tmpstr)) { - SV *sv = SvROK(tmpstr) ? SvRV(tmpstr) : tmpstr; + if(SvROK(tmpstr)) { + SV *sv = SvRV(tmpstr); if(SvMAGICAL(sv)) mg = mg_find(sv, 'r'); } @@ -101,7 +101,6 @@ PP(pp_regcomp) { pm->op_pmflags = pm->op_pmpermflags; /* reset case sensitivity */ pm->op_pmregexp = pregcomp(t, t + len, pm); - sv_magic(tmpstr,(SV*)ReREFCNT_inc(pm->op_pmregexp),'r',0,0); } } diff --git a/proto.h b/proto.h index 97eda50..d7b7762 100644 --- a/proto.h +++ b/proto.h @@ -269,7 +269,6 @@ VIRTUAL int magic_setuvar _((SV* sv, MAGIC* mg)); VIRTUAL int magic_setvec _((SV* sv, MAGIC* mg)); VIRTUAL int magic_set_all_env _((SV* sv, MAGIC* mg)); VIRTUAL U32 magic_sizepack _((SV* sv, MAGIC* mg)); -VIRTUAL int magic_unchain _((SV* sv, MAGIC* mg)); VIRTUAL int magic_wipepack _((SV* sv, MAGIC* mg)); VIRTUAL void magicname _((char* sym, char* name, I32 namlen)); int main _((int argc, char** argv, char** env)); diff --git a/sv.c b/sv.c index df3fbe3..245c4a5 100644 --- a/sv.c +++ b/sv.c @@ -2575,7 +2575,6 @@ sv_magic(register SV *sv, SV *obj, int how, char *name, I32 namlen) mg->mg_virtual = &vtbl_packelem; break; case 'r': - SvRMAGICAL_on(sv); mg->mg_virtual = &vtbl_regexp; break; case 'S':