diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-18 19:37:41 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-18 19:37:41 +0000 |
commit | 227a8b4b89a56a5f0c4892bc310a24a6cfceb3b7 (patch) | |
tree | 9d62b508b060ee139abf54965068642252596cef | |
parent | 4c50607213c2b23bfa1ef0717a5a31b40103430b (diff) | |
download | perl-227a8b4b89a56a5f0c4892bc310a24a6cfceb3b7.tar.gz |
back out problematic change#1105, tweak perlsub.pod
p4raw-link: @1105 on //depot/perl: e2d46a1de163ba101bb4392a8fa6d97ca3c9a323
p4raw-id: //depot/perl@1146
-rw-r--r-- | embed.h | 1 | ||||
-rw-r--r-- | global.sym | 1 | ||||
-rw-r--r-- | mg.c | 7 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | pod/perlsub.pod | 2 | ||||
-rw-r--r-- | pp_ctl.c | 5 | ||||
-rw-r--r-- | proto.h | 1 | ||||
-rw-r--r-- | sv.c | 1 |
8 files changed, 4 insertions, 16 deletions
@@ -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 9b3308f42d..5001c3c35e 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 @@ -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) @@ -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 5baff89473..392323a288 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; @@ -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); } } @@ -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)); @@ -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': |