[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7593] MiscXS use bytes_to_utf8
From: |
gavinsmith0123 |
Subject: |
[7593] MiscXS use bytes_to_utf8 |
Date: |
Sat, 31 Dec 2016 15:46:33 +0000 (UTC) |
Revision: 7593
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7593
Author: gavin
Date: 2016-12-31 15:46:32 +0000 (Sat, 31 Dec 2016)
Log Message:
-----------
MiscXS use bytes_to_utf8
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/MiscXS/MiscXS.xs
trunk/tp/Texinfo/MiscXS/miscxs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-12-31 13:23:40 UTC (rev 7592)
+++ trunk/ChangeLog 2016-12-31 15:46:32 UTC (rev 7593)
@@ -1,5 +1,14 @@
2016-12-31 Gavin Smith <address@hidden>
+ * tp/Texinfo/MiscXS/miscxs.c (xs_abort_empty_line): Use
+ 'bytes_to_utf8' instead of calling 'sv_utf8_upgrade'. The
+ latter appears to cause strange results under perl 5.10.1
+ (possibly involving the value of $1), and there is a warning
+ about using 'sv_utf8_upgrade' in the perlguts
+ man page.
+
+2016-12-31 Gavin Smith <address@hidden>
+
* tp/Texinfo/Convert/XSParagraph/configure.ac,
* tp/Texinfo/MiscXS/configure.ac: Use 'test -n' instead of
'test -v' for better portability. Clear another cache variable
Modified: trunk/tp/Texinfo/MiscXS/MiscXS.xs
===================================================================
--- trunk/tp/Texinfo/MiscXS/MiscXS.xs 2016-12-31 13:23:40 UTC (rev 7592)
+++ trunk/tp/Texinfo/MiscXS/MiscXS.xs 2016-12-31 15:46:32 UTC (rev 7593)
@@ -38,7 +38,7 @@
SV *additional_text = 0;
CODE:
items -= 2;
- if (items > 0)
+ if (items > 0 && SvOK(ST(2)))
{
additional_text = ST(2);
}
Modified: trunk/tp/Texinfo/MiscXS/miscxs.c
===================================================================
--- trunk/tp/Texinfo/MiscXS/miscxs.c 2016-12-31 13:23:40 UTC (rev 7592)
+++ trunk/tp/Texinfo/MiscXS/miscxs.c 2016-12-31 15:46:32 UTC (rev 7593)
@@ -56,10 +56,15 @@
/* Get additional text in UTF-8. */
if (additional_text_in)
{
+ STRLEN len;
+ static char *new_string;
+ additional_text = SvPV (additional_text_in, len);
if (!SvUTF8 (additional_text_in))
- sv_utf8_upgrade (additional_text_in);
-
- additional_text = SvPV_nolen (additional_text_in);
+ {
+ free (new_string);
+ new_string = bytes_to_utf8 (additional_text, &len);
+ additional_text = new_string;
+ }
}
else
additional_text = "";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7593] MiscXS use bytes_to_utf8,
gavinsmith0123 <=