Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encode: Rmv impediment to compiling under C++11 #78

Merged
merged 1 commit into from
Nov 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Encode.xs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ encode_method(pTHX_ const encode_t * enc, const encpage_t * dir, SV * src, U8 *
SV* subchar =
(fallback_cb != &PL_sv_undef)
? do_fallback_cb(aTHX_ ch, fallback_cb)
: newSVpvf(check & ENCODE_PERLQQ ? "\\x{%04"UVxf"}" :
: newSVpvf(check & ENCODE_PERLQQ ? "\\x{%04" UVxf "}" :
check & ENCODE_HTMLCREF ? "&#%" UVuf ";" :
"&#x%" UVxf ";", (UV)ch);
SvUTF8_off(subchar); /* make sure no decoded string gets in */
Expand Down
16 changes: 8 additions & 8 deletions Unicode/Unicode.xs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ CODE:
}
if (ucs2 || size == 4) {
if (check) {
croak("%"SVf":no surrogates allowed %"UVxf,
croak("%" SVf ":no surrogates allowed %" UVxf,
*hv_fetch((HV *)SvRV(obj),"Name",4,0),
ord);
}
Expand All @@ -216,7 +216,7 @@ CODE:
UV lo;
if (!isHiSurrogate(ord)) {
if (check) {
croak("%"SVf":Malformed HI surrogate %"UVxf,
croak("%" SVf ":Malformed HI surrogate %" UVxf,
*hv_fetch((HV *)SvRV(obj),"Name",4,0),
ord);
}
Expand All @@ -231,7 +231,7 @@ CODE:
break;
}
else {
croak("%"SVf":Malformed HI surrogate %"UVxf,
croak("%" SVf ":Malformed HI surrogate %" UVxf,
*hv_fetch((HV *)SvRV(obj),"Name",4,0),
ord);
}
Expand All @@ -244,7 +244,7 @@ CODE:
lo = enc_unpack(aTHX_ &s,e,size,endian);
if (!isLoSurrogate(lo)) {
if (check) {
croak("%"SVf":Malformed LO surrogate %"UVxf,
croak("%" SVf ":Malformed LO surrogate %" UVxf,
*hv_fetch((HV *)SvRV(obj),"Name",4,0),
ord);
}
Expand All @@ -262,7 +262,7 @@ CODE:

if ((ord & 0xFFFE) == 0xFFFE || (ord >= 0xFDD0 && ord <= 0xFDEF)) {
if (check) {
croak("%"SVf":Unicode character %"UVxf" is illegal",
croak("%" SVf ":Unicode character %" UVxf " is illegal",
*hv_fetch((HV *)SvRV(obj),"Name",4,0),
ord);
} else {
Expand Down Expand Up @@ -295,7 +295,7 @@ CODE:
if (s < e) {
/* unlikely to happen because it's fixed-length -- dankogai */
if (check & ENCODE_WARN_ON_ERR) {
Perl_warner(aTHX_ packWARN(WARN_UTF8),"%"SVf":Partial character",
Perl_warner(aTHX_ packWARN(WARN_UTF8),"%" SVf ":Partial character",
*hv_fetch((HV *)SvRV(obj),"Name",4,0));
}
}
Expand Down Expand Up @@ -368,7 +368,7 @@ CODE:
}
if (ucs2 || ord > 0x10FFFF) {
if (check) {
croak("%"SVf":code point \"\\x{%"UVxf"}\" too high",
croak("%" SVf ":code point \"\\x{%" UVxf "}\" too high",
*hv_fetch((HV *)SvRV(obj),"Name",4,0),ord);
}
enc_pack(aTHX_ result,size,endian,FBCHAR);
Expand All @@ -394,7 +394,7 @@ CODE:
But this is critical when you choose to LEAVE_SRC
in which case we die */
if (check & (ENCODE_DIE_ON_ERR|ENCODE_LEAVE_SRC)) {
Perl_croak(aTHX_ "%"SVf":partial character is not allowed "
Perl_croak(aTHX_ "%" SVf ":partial character is not allowed "
"when CHECK = 0x%" UVuf,
*hv_fetch((HV *)SvRV(obj),"Name",4,0), check);
}
Expand Down