forked from pool/perl-Net-IDN-Encode
Add use-uvchr_to_utf8_flags-instead-of-uvuni_to_utf8_fla.patch OBS-URL: https://build.opensuse.org/request/show/1239103 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-IDN-Encode?expand=0&rev=24
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From 3ebe6f2e239b470efcb64a044edc8202798188af Mon Sep 17 00:00:00 2001
|
|
From: Shin Kojima <shin@kojima.org>
|
|
Date: Sun, 23 Jul 2023 13:15:59 +0900
|
|
Subject: [PATCH] use uvchr_to_utf8_flags instead of uvuni_to_utf8_flags (which
|
|
is removed in perl 5.38.0)
|
|
|
|
https://perldoc.perl.org/5.36.0/perlintern#uvuni_to_utf8_flags
|
|
Signed-off-by: Shin Kojima <shin@kojima.org>
|
|
---
|
|
lib/Net/IDN/Punycode.xs | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/Net/IDN/Punycode.xs b/lib/Net/IDN/Punycode.xs
|
|
index 211ef9c..36530dd 100644
|
|
--- a/lib/Net/IDN/Punycode.xs
|
|
+++ b/lib/Net/IDN/Punycode.xs
|
|
@@ -24,6 +24,10 @@
|
|
#define utf8_to_uvchr_buf(in_p,in_e,u8) utf8_to_uvchr(in_p,u8);
|
|
#endif
|
|
|
|
+#ifndef uvchr_to_utf8_flags
|
|
+#define uvchr_to_utf8_flags(d, uv, flags) uvuni_to_utf8_flags(d, uv, flags);
|
|
+#endif
|
|
+
|
|
static char enc_digit[BASE] = {
|
|
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
|
|
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
|
@@ -253,7 +257,7 @@ decode_punycode(input)
|
|
if(skip_p < re_p) /* move succeeding chars */
|
|
Move(skip_p, skip_p + u8, re_p - skip_p, char);
|
|
re_p += u8;
|
|
- uvuni_to_utf8_flags((U8*)skip_p, n, UNICODE_ALLOW_ANY);
|
|
+ uvchr_to_utf8_flags((U8*)skip_p, n, UNICODE_ALLOW_ANY);
|
|
}
|
|
|
|
if(!first) SvUTF8_on(RETVAL); /* UTF-8 chars have been inserted */
|
|
--
|
|
2.48.0
|
|
|