Minor doc & portability fixes
This commit is contained in:
parent
7b0ba45346
commit
0c59b56ee8
4 changed files with 11 additions and 6 deletions
|
|
@ -31,6 +31,7 @@ static void fuxmlwr_escape(pTHX_ fuxmlwr *wr, SV *sv) {
|
|||
const unsigned char *str = (unsigned char *)SvPV_const(sv, len);
|
||||
const unsigned char *tmp, *end = str + len;
|
||||
unsigned char x = 0;
|
||||
unsigned char *buf;
|
||||
int utf8 = SvUTF8(sv);
|
||||
|
||||
while (str < end) {
|
||||
|
|
@ -55,7 +56,7 @@ static void fuxmlwr_escape(pTHX_ fuxmlwr *wr, SV *sv) {
|
|||
case '&': fustr_write(&wr->out, "&", 5); break;
|
||||
case '"': fustr_write(&wr->out, """, 6); break;
|
||||
default:
|
||||
unsigned char *buf = (unsigned char *)fustr_write_buf(&wr->out, 2);
|
||||
buf = (unsigned char *)fustr_write_buf(&wr->out, 2);
|
||||
buf[0] = 0xc0 | (x >> 6);
|
||||
buf[1] = 0x80 | (x & 0x3f);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue