Blob Blame History Raw
From cfaedb2beda37cbc3575ee818c3c83ea87673c32 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Wed, 14 Feb 2018 15:47:46 -0700
Subject: [PATCH] Fix https://rt.cpan.org/Ticket/Display.html?id=124399
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Encode 2.95 broke this module, which is testing for a particular warning
message.  It was not my intent to change any part of the API with the
commits that comprise 2.95, and it turns out that the message is
different only in one or two perl versions where an interaction with a
deprecation caused the new message to be displayed.

The commit here just keeps the old code being used into the 5.27 series.
It probably could work starting in 5.27.2, but its easier to use a
marker of the existence of a newer function, and since the affected
versions are all development releases, I went with the marker.

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 Encode.xs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Encode.xs b/Encode.xs
index 91c5257..13eb15d 100644
--- a/Encode.xs
+++ b/Encode.xs
@@ -387,7 +387,7 @@ strict_utf8(pTHX_ SV* sv)
 }
 
 /* Modern perls have the capability to do this more efficiently and portably */
-#ifdef is_utf8_string_loc_flags
+#ifdef utf8n_to_uvchr_msgs
 # define CAN_USE_BASE_PERL
 #endif
 
-- 
2.13.6