summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-05 22:33:12 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-05 22:33:12 +0000
commitd2f13c598f9812cd520097e22d819d1b9f7b0cb6 (patch)
tree51c2739d4fe37c20fc90e087816461a35cf48e5a /regexec.c
parent62a1a1efb41483ae8589f3158be0ce9a1c21e8e2 (diff)
downloadperl-d2f13c598f9812cd520097e22d819d1b9f7b0cb6.tar.gz
Make REGEXP a type distinct from SV. (Much like AV, CV, GV, HV).
p4raw-id: //depot/perl@32861
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/regexec.c b/regexec.c
index 64966941c7..0f1c9e11bd 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3633,7 +3633,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
#define ST st->u.eval
{
SV *ret;
- SV *re_sv;
+ REGEXP *re_sv;
regexp *re;
regexp_internal *rei;
regnode *startpoint;
@@ -3720,13 +3720,13 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
SV *const sv = SvRV(ret);
if (SvTYPE(sv) == SVt_REGEXP) {
- rx = sv;
+ rx = (REGEXP*) sv;
} else if (SvSMAGICAL(sv)) {
mg = mg_find(sv, PERL_MAGIC_qr);
assert(mg);
}
} else if (SvTYPE(ret) == SVt_REGEXP) {
- rx = ret;
+ rx = (REGEXP*) ret;
} else if (SvSMAGICAL(ret)) {
if (SvGMAGICAL(ret)) {
/* I don't believe that there is ever qr magic
@@ -3745,7 +3745,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
}
if (mg) {
- rx = mg->mg_obj; /*XXX:dmq*/
+ rx = (REGEXP *) mg->mg_obj; /*XXX:dmq*/
assert(rx);
}
if (rx) {
@@ -3774,7 +3774,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
/* This isn't a first class regexp. Instead, it's
caching a regexp onto an existing, Perl visible
scalar. */
- sv_magic(ret, rx, PERL_MAGIC_qr, 0, 0);
+ sv_magic(ret, (SV*) rx, PERL_MAGIC_qr, 0, 0);
}
PL_regsize = osize;
}