develooper Front page | perl.perl5.porters | Postings from June 2002

Re: Another Unicode s/// buglet?

Thread Previous | Thread Next
From:
Hugo van der Sanden
Date:
June 26, 2002 10:43
Subject:
Re: Another Unicode s/// buglet?
Message ID:
200206261743.g5QHhIC27702@crypt.compulink.co.uk
Jarkko Hietaniemi <jhi@iki.fi> wrote:
:> +	    SV* sv = sv_newmortal();
:> +	    SvSetMagicSV(sv, dstr);
:
:Hmmm, I don't do anything special with magic.

Ok, looking more closely at the regexec.c code I copied from, it is
clear to me that SvSetSV would be enough there as well.

Hugo
--- regexec.c.old	Tue Apr 23 08:38:41 2002
+++ regexec.c	Wed Jun 26 18:30:04 2002
@@ -4526,7 +4526,7 @@
     SV* sv;
     if (prog->float_substr && !prog->float_utf8) {
 	prog->float_utf8 = sv = NEWSV(117, 0);
-	SvSetMagicSV(sv, prog->float_substr);
+	SvSetSV(sv, prog->float_substr);
 	sv_utf8_upgrade(sv);
 	if (SvTAIL(prog->float_substr))
 	    SvTAIL_on(sv);
@@ -4535,7 +4535,7 @@
     }
     if (prog->anchored_substr && !prog->anchored_utf8) {
 	prog->anchored_utf8 = sv = NEWSV(118, 0);
-	SvSetMagicSV(sv, prog->anchored_substr);
+	SvSetSV(sv, prog->anchored_substr);
 	sv_utf8_upgrade(sv);
 	if (SvTAIL(prog->anchored_substr))
 	    SvTAIL_on(sv);
@@ -4550,7 +4550,7 @@
     SV* sv;
     if (prog->float_utf8 && !prog->float_substr) {
 	prog->float_substr = sv = NEWSV(117, 0);
-	SvSetMagicSV(sv, prog->float_utf8);
+	SvSetSV(sv, prog->float_utf8);
 	if (sv_utf8_downgrade(sv, TRUE)) {
 	    if (SvTAIL(prog->float_utf8))
 		SvTAIL_on(sv);
@@ -4563,7 +4563,7 @@
     }
     if (prog->anchored_utf8 && !prog->anchored_substr) {
 	prog->anchored_substr = sv = NEWSV(118, 0);
-	SvSetMagicSV(sv, prog->anchored_utf8);
+	SvSetSV(sv, prog->anchored_utf8);
 	if (sv_utf8_downgrade(sv, TRUE)) {
 	    if (SvTAIL(prog->anchored_utf8))
 		SvTAIL_on(sv);

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About