aports/community/perl-xml-easy/uvuni_to_utf8_flags.patch
Celeste 1cf83854eb community/perl-xml-easy: apply debian patch
to fix implicit declaration of function
`uvuni_to_utf8_flags` (removed in Perl 5.38)
2024-06-10 02:47:59 +00:00

35 lines
1.2 KiB
Diff

Patch-Source: https://sources.debian.org/data/main/libx/libxml-easy-perl/0.011-4/debian/patches/uvuni_to_utf8_flags.patch
--
Description: Use uvchr_to_utf8_flags instead of uvuni_to_utf8_flags (removed in perl 5.38.0)
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2241708 and
https://rt.cpan.org/Public/Bug/Display.html?id=149108
Origin: vendor
Bug-Debian: https://bugs.debian.org/1065785
Forwarded: not-yet, CPAN RT is not cooperative
Author: gregor herrmann <gregoa@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2024-03-10
--- a/lib/XML/Easy.xs
+++ b/lib/XML/Easy.xs
@@ -50,6 +50,10 @@
(!sv_is_glob(sv) && !sv_is_regexp(sv) && \
(SvFLAGS(sv) & (SVf_IOK|SVf_NOK|SVf_POK|SVp_IOK|SVp_NOK|SVp_POK)))
+#ifndef uvchr_to_utf8_flags
+#define uvchr_to_utf8_flags(d, uv, flags) uvuni_to_utf8_flags(d, uv, flags);
+#endif
+
/* exceptions */
#define throw_utf8_error() croak("broken internal UTF-8 encoding\n")
@@ -1151,7 +1155,7 @@
vlen = SvCUR(value);
vstart = (U8*)SvGROW(value, vlen+4+1);
voldend = vstart + vlen;
- vnewend = uvuni_to_utf8_flags(voldend, val,
+ vnewend = uvchr_to_utf8_flags(voldend, val,
UNICODE_ALLOW_ANY);
*vnewend = 0;
SvCUR_set(value, vnewend - vstart);