summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avar@cpan.org>2008-01-09 21:05:15 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-10 00:32:20 +0000
commit67d2d14de02de63c7c9137828ed7884f27d67b65 (patch)
tree1531ff19d3766c7fd0f6754091ae414321d84dd2 /regcomp.c
parent1db36481d13cc744ff50a6e79d19885d5071f098 (diff)
downloadperl-67d2d14de02de63c7c9137828ed7884f27d67b65.tar.gz
Move the reg_stringify logic to Perl_sv_2pv_flags
Message-ID: <86zlveaewk.fsf@cpan.org> with two corrections. Plus remove reg_stringify from embed.fnc and regen. p4raw-id: //depot/perl@32934
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/regcomp.c b/regcomp.c
index 0c503e9f8a..28c12d18aa 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -9569,48 +9569,8 @@ Perl_regdupe_internal(pTHX_ REGEXP * const rx, CLONE_PARAMS *param)
#endif /* USE_ITHREADS */
-/*
- reg_stringify()
-
- converts a regexp embedded in a MAGIC struct to its stringified form,
- caching the converted form in the struct and returns the cached
- string.
-
- If lp is nonnull then it is used to return the length of the
- resulting string
-
- If flags is nonnull and the returned string contains UTF8 then
- (*flags & 1) will be true.
-
- If haseval is nonnull then it is used to return whether the pattern
- contains evals.
-
- Normally called via macro:
-
- CALLREG_STRINGIFY(mg,&len,&utf8);
-
- And internally with
-
- CALLREG_AS_STR(mg,&lp,&flags,&haseval)
-
- See sv_2pv_flags() in sv.c for an example of internal usage.
-
- */
#ifndef PERL_IN_XSUB_RE
-char *
-Perl_reg_stringify(pTHX_ MAGIC *mg, STRLEN *lp, U32 *flags, I32 *haseval ) {
- dVAR;
- const REGEXP * const re = (REGEXP *)mg->mg_obj;
- if (haseval)
- *haseval = RX_SEEN_EVALS(re);
- if (flags)
- *flags = RX_UTF8(re) ? 1 : 0;
- if (lp)
- *lp = RX_WRAPLEN(re);
- return RX_WRAPPED(re);
-}
-
/*
- regnext - dig the "next" pointer out of a node
*/