summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-29 07:08:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-29 07:08:32 +0000
commitc512ce4f7f4a9bd0f491f91cb5a15fcb65ee37d9 (patch)
treefaecae30ec45ee9fe9180f727c600de58a3a50d2 /doop.c
parenta7514e1ec900a5b60cda6ed25728476973d26ae0 (diff)
downloadperl-c512ce4f7f4a9bd0f491f91cb5a15fcb65ee37d9.tar.gz
(Retracted by #8264) Externally: join() was still quite UTF-8-unaware.
Internally: sv_catsv() wasn't quite okay on UTF-8, it assumed that the only cases to care about are byte+byte and byte+character. TODO: See how well pp_concat() could be implemented in terms of sv_catsv(). p4raw-id: //depot/perl@8248
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/doop.c b/doop.c
index ea65a68eab..3548556a89 100644
--- a/doop.c
+++ b/doop.c
@@ -504,8 +504,6 @@ Perl_do_join(pTHX_ register SV *sv, SV *del, register SV **mark, register SV **s
}
if (items-- > 0) {
- char *s;
-
sv_setpv(sv, "");
if (*mark)
sv_catsv(sv, *mark);
@@ -513,10 +511,9 @@ Perl_do_join(pTHX_ register SV *sv, SV *del, register SV **mark, register SV **s
}
else
sv_setpv(sv,"");
- len = delimlen;
- if (len) {
+ if (delimlen) {
for (; items > 0; items--,mark++) {
- sv_catpvn(sv,delim,len);
+ sv_catsv(sv,del);
sv_catsv(sv,*mark);
}
}