summaryrefslogtreecommitdiff
path: root/ext/Encode
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Encode')
-rw-r--r--ext/Encode/Encode.xs6
-rw-r--r--ext/Encode/Unicode/Unicode.xs2
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs
index 0f3f1d4185..09918a1785 100644
--- a/ext/Encode/Encode.xs
+++ b/ext/Encode/Encode.xs
@@ -80,7 +80,7 @@ encode_method(pTHX_ encode_t * enc, encpage_t * dir, SV * src,
goto ENCODE_END;
}
- while (code = do_encode(dir, s, &slen, d, dlen, &dlen, !check))
+ while( (code = do_encode(dir, s, &slen, d, dlen, &dlen, !check)) )
{
SvCUR_set(dst, dlen+ddone);
SvPOK_only(dst);
@@ -172,14 +172,14 @@ encode_method(pTHX_ encode_t * enc, encpage_t * dir, SV * src,
else {
if (check & ENCODE_DIE_ON_ERR){
Perl_croak(aTHX_ ERR_DECODE_NOMAP,
- PTR2UV(enc->name[0]), (U8)s[slen]);
+ enc->name[0], (UV)s[slen]);
return &PL_sv_undef; /* never reaches but be safe */
}
if (check & ENCODE_WARN_ON_ERR){
Perl_warner(
aTHX_ packWARN(WARN_UTF8),
ERR_DECODE_NOMAP,
- PTR2UV(enc->name[0]), (U8)s[slen]);
+ enc->name[0], (UV)s[slen]);
}
if (check & ENCODE_RETURN_ON_ERR){
goto ENCODE_SET_SRC;
diff --git a/ext/Encode/Unicode/Unicode.xs b/ext/Encode/Unicode/Unicode.xs
index e3ad82c7f0..a330ea07f5 100644
--- a/ext/Encode/Unicode/Unicode.xs
+++ b/ext/Encode/Unicode/Unicode.xs
@@ -212,7 +212,7 @@ CODE:
if (!issurrogate(ord)){
if (ucs2) {
if (check) {
- croak("%s:code point \"\\x{"UVxf"}\" too high",
+ croak("%s:code point \"\\x{%"UVxf"}\" too high",
SvPV_nolen(
*hv_fetch((HV *)SvRV(obj),"Name",4,0))
,ord);