summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-18 19:37:41 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-18 19:37:41 +0000
commit227a8b4b89a56a5f0c4892bc310a24a6cfceb3b7 (patch)
tree9d62b508b060ee139abf54965068642252596cef
parent4c50607213c2b23bfa1ef0717a5a31b40103430b (diff)
downloadperl-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.h1
-rw-r--r--global.sym1
-rw-r--r--mg.c7
-rw-r--r--perl.h2
-rw-r--r--pod/perlsub.pod2
-rw-r--r--pp_ctl.c5
-rw-r--r--proto.h1
-rw-r--r--sv.c1
8 files changed, 4 insertions, 16 deletions
diff --git a/embed.h b/embed.h
index c5b537ea94..9768718a0e 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 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
diff --git a/mg.c b/mg.c
index b981c12fae..d6ea1d2c58 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 60f7dd5605..c8bd8b5e0e 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 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;
diff --git a/pp_ctl.c b/pp_ctl.c
index 9b924bc0f8..444036ea7e 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 97eda50ce7..d7b7762d10 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 df3fbe3aeb..245c4a50d4 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':