summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-07-01 14:28:05 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-01 13:42:28 +0000
commitd103360b8581685282078776ac5692a3521f9a95 (patch)
treef8738a77f9819c5ff19b5125acf6ca0ac7dc0258 /regcomp.c
parentfaf11cac614129491d0258772ee4e6f8a3fb39e8 (diff)
downloadperl-d103360b8581685282078776ac5692a3521f9a95.tar.gz
-Dr and unicode
Message-Id: <200207011228.g61CS5r06772@crypt.compulink.co.uk> p4raw-id: //depot/perl@17391
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 6b17be12af..7b9f53f240 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4882,9 +4882,13 @@ Perl_pregfree(pTHX_ struct regexp *r)
if (!r || (--r->refcnt > 0))
return;
DEBUG_r({
- char *s = pv_uni_display(dsv, (U8*)r->precomp, r->prelen, 60,
- UNI_DISPLAY_REGEX);
- int len = SvCUR(dsv);
+ int len;
+ char *s;
+
+ s = (r->reganch & ROPT_UTF8) ? pv_uni_display(dsv, (U8*)r->precomp,
+ r->prelen, 60, UNI_DISPLAY_REGEX)
+ : pv_display(dsv, (U8*)r->precomp, r->prelen, 0, 60);
+ len = SvCUR(dsv);
if (!PL_colorset)
reginitcolors();
PerlIO_printf(Perl_debug_log,