Bug Summary

File:obj/gnu/usr.bin/perl/dist/Unicode-Normalize/Normalize.c
Warning:line 237, column 6
Value stored to 's' is never read

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple amd64-unknown-openbsd7.0 -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name Normalize.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 1 -fhalf-no-semantic-interposition -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-feature +retpoline-indirect-calls -target-feature +retpoline-indirect-branches -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/usr/obj/gnu/usr.bin/perl/dist/Unicode-Normalize -resource-dir /usr/local/lib/clang/13.0.0 -D NO_LOCALE_NUMERIC -D NO_LOCALE_COLLATE -D VERSION="1.27" -D XS_VERSION="1.27" -D PIC -I ../.. -internal-isystem /usr/local/lib/clang/13.0.0/include -internal-externc-isystem /usr/include -O2 -Wwrite-strings -fconst-strings -fdebug-compilation-dir=/usr/obj/gnu/usr.bin/perl/dist/Unicode-Normalize -ferror-limit 19 -fwrapv -D_RET_PROTECTOR -ret-protector -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-valloc -fno-builtin-free -fno-builtin-strdup -fno-builtin-strndup -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/ben/Projects/vmm/scan-build/2022-01-12-194120-40624-1 -x c Normalize.c
1/*
2 * This file was generated automatically by ExtUtils::ParseXS version 3.40 from the
3 * contents of Normalize.xs. Do not edit this file, edit Normalize.xs instead.
4 *
5 * ANY CHANGES MADE HERE WILL BE LOST!
6 *
7 */
8
9#line 1 "Normalize.xs"
10
11#define PERL_NO_GET_CONTEXT /* we want efficiency */
12
13/* private functions which need pTHX_ and aTHX_
14 pv_cat_decompHangul
15 sv_2pvunicode
16 pv_utf8_decompose
17 pv_utf8_reorder
18 pv_utf8_compose
19*/
20
21#include "EXTERN.h"
22#include "perl.h"
23#include "XSUB.h"
24
25/* These 5 files are prepared by mkheader */
26#include "unfcmb.h"
27#include "unfcan.h"
28#include "unfcpt.h"
29#include "unfcmp.h"
30#include "unfexc.h"
31
32/* The generated normalization tables since v5.20 are in native character set
33 * terms. Prior to that, they were in Unicode terms. So we use 'uvchr' for
34 * later perls, and redefine that to be 'uvuni' for earlier ones */
35#if PERL_VERSION32 < 20
36# undef uvchr_to_utf8
37# ifdef uvuni_to_utf8
38# define uvchr_to_utf8 uvuni_to_utf8
39# else /* Perl 5.6.1 */
40# define uvchr_to_utf8 uv_to_utf8
41# endif
42
43# undef utf8n_to_uvchr
44# ifdef utf8n_to_uvuni
45# define utf8n_to_uvchr utf8n_to_uvuni
46# else /* Perl 5.6.1 */
47# define utf8n_to_uvchr utf8_to_uv
48# endif
49#endif
50
51/* UTF8_ALLOW_BOM is used before Perl 5.8.0 */
52#ifndef UTF8_ALLOW_BOM(0)
53#define UTF8_ALLOW_BOM(0) (0)
54#endif /* UTF8_ALLOW_BOM */
55
56#ifndef UTF8_ALLOW_SURROGATE0
57#define UTF8_ALLOW_SURROGATE0 (0)
58#endif /* UTF8_ALLOW_SURROGATE */
59
60#ifndef UTF8_ALLOW_FE_FF0
61#define UTF8_ALLOW_FE_FF0 (0)
62#endif /* UTF8_ALLOW_FE_FF */
63
64#ifndef UTF8_ALLOW_FFFF0
65#define UTF8_ALLOW_FFFF0 (0)
66#endif /* UTF8_ALLOW_FFFF */
67
68#ifndef PERL_UNUSED_VAR
69# define PERL_UNUSED_VAR(x)((void)sizeof(x)) ((void)sizeof(x))
70#endif
71
72#define AllowAnyUTF(0|(0)|0|0) (UTF8_ALLOW_SURROGATE0|UTF8_ALLOW_BOM(0)|UTF8_ALLOW_FE_FF0|UTF8_ALLOW_FFFF0)
73
74/* check if the string buffer is enough before uvchr_to_utf8(). */
75/* dstart, d, and dlen should be defined outside before. */
76#define Renew_d_if_not_enough_to(need)STRLEN curlen = d - dstart; if (dlen < curlen + (need)) { dlen
+= (need); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
STRLEN curlen = d - dstart; \
77 if (dlen < curlen + (need)) { \
78 dlen += (need); \
79 Renew(dstart, dlen+1, U8)(dstart = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(dlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysrealloc
((void *)(dstart),(size_t)((dlen+1)*sizeof(U8))))))
; \
80 d = dstart + curlen; \
81 }
82
83/* if utf8n_to_uvchr() sets retlen to 0 (if broken?) */
84#define ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character" "panic (Unicode::Normalize %s): zero-length character"
85
86/* utf8_hop() hops back before start. Maybe broken UTF-8 */
87#define ErrHopBeforeStart"panic (Unicode::Normalize): hopping before start" "panic (Unicode::Normalize): hopping before start"
88
89/* At present, char > 0x10ffff are unaffected without complaint, right? */
90#define VALID_UTF_MAX(0x10ffff) (0x10ffff)
91#define OVER_UTF_MAX(uv)((0x10ffff) < (uv)) (VALID_UTF_MAX(0x10ffff) < (uv))
92
93/* size of array for combining characters */
94/* enough as an initial value? */
95#define CC_SEQ_SIZE(10) (10)
96#define CC_SEQ_STEP(5) (5)
97
98/* HANGUL begin */
99#define Hangul_SBase0xAC00 0xAC00
100#define Hangul_SFinal0xD7A3 0xD7A3
101#define Hangul_SCount11172 11172
102
103#define Hangul_NCount588 588
104
105#define Hangul_LBase0x1100 0x1100
106#define Hangul_LFinal0x1112 0x1112
107#define Hangul_LCount19 19
108
109#define Hangul_VBase0x1161 0x1161
110#define Hangul_VFinal0x1175 0x1175
111#define Hangul_VCount21 21
112
113#define Hangul_TBase0x11A7 0x11A7
114#define Hangul_TFinal0x11C2 0x11C2
115#define Hangul_TCount28 28
116
117#define Hangul_IsS(u)((0xAC00 <= (u)) && ((u) <= 0xD7A3)) ((Hangul_SBase0xAC00 <= (u)) && ((u) <= Hangul_SFinal0xD7A3))
118#define Hangul_IsN(u)(((u) - 0xAC00) % 28 == 0) (((u) - Hangul_SBase0xAC00) % Hangul_TCount28 == 0)
119#define Hangul_IsLV(u)(((0xAC00 <= (u)) && ((u) <= 0xD7A3)) &&
(((u) - 0xAC00) % 28 == 0))
(Hangul_IsS(u)((0xAC00 <= (u)) && ((u) <= 0xD7A3)) && Hangul_IsN(u)(((u) - 0xAC00) % 28 == 0))
120#define Hangul_IsL(u)((0x1100 <= (u)) && ((u) <= 0x1112)) ((Hangul_LBase0x1100 <= (u)) && ((u) <= Hangul_LFinal0x1112))
121#define Hangul_IsV(u)((0x1161 <= (u)) && ((u) <= 0x1175)) ((Hangul_VBase0x1161 <= (u)) && ((u) <= Hangul_VFinal0x1175))
122#define Hangul_IsT(u)((0x11A7 < (u)) && ((u) <= 0x11C2)) ((Hangul_TBase0x11A7 < (u)) && ((u) <= Hangul_TFinal0x11C2))
123/* HANGUL end */
124
125/* this is used for canonical ordering of combining characters (c.c.). */
126typedef struct {
127 U8 cc; /* combining class */
128 UV uv; /* codepoint */
129 STRLEN pos; /* position */
130} UNF_cc;
131
132static int compare_cc(const void *a, const void *b)
133{
134 int ret_cc;
135 ret_cc = ((UNF_cc*) a)->cc - ((UNF_cc*) b)->cc;
136 if (ret_cc)
137 return ret_cc;
138
139 return ( ((UNF_cc*) a)->pos > ((UNF_cc*) b)->pos )
140 - ( ((UNF_cc*) a)->pos < ((UNF_cc*) b)->pos );
141}
142
143static U8* dec_canonical(UV uv)
144{
145 U8 ***plane, **row;
146 if (OVER_UTF_MAX(uv)((0x10ffff) < (uv)))
147 return NULL((void*)0);
148 plane = (U8***)UNF_canon[uv >> 16];
149 if (! plane)
150 return NULL((void*)0);
151 row = plane[(uv >> 8) & 0xff];
152 return row ? row[uv & 0xff] : NULL((void*)0);
153}
154
155static U8* dec_compat(UV uv)
156{
157 U8 ***plane, **row;
158 if (OVER_UTF_MAX(uv)((0x10ffff) < (uv)))
159 return NULL((void*)0);
160 plane = (U8***)UNF_compat[uv >> 16];
161 if (! plane)
162 return NULL((void*)0);
163 row = plane[(uv >> 8) & 0xff];
164 return row ? row[uv & 0xff] : NULL((void*)0);
165}
166
167static UV composite_uv(UV uv, UV uv2)
168{
169 UNF_complist ***plane, **row, *cell, *i;
170
171 if (!uv2 || OVER_UTF_MAX(uv)((0x10ffff) < (uv)) || OVER_UTF_MAX(uv2)((0x10ffff) < (uv2)))
172 return 0;
173
174 if (Hangul_IsL(uv)((0x1100 <= (uv)) && ((uv) <= 0x1112)) && Hangul_IsV(uv2)((0x1161 <= (uv2)) && ((uv2) <= 0x1175))) {
175 UV lindex = uv - Hangul_LBase0x1100;
176 UV vindex = uv2 - Hangul_VBase0x1161;
177 return(Hangul_SBase0xAC00 + (lindex * Hangul_VCount21 + vindex) *
178 Hangul_TCount28);
179 }
180 if (Hangul_IsLV(uv)(((0xAC00 <= (uv)) && ((uv) <= 0xD7A3)) &&
(((uv) - 0xAC00) % 28 == 0))
&& Hangul_IsT(uv2)((0x11A7 < (uv2)) && ((uv2) <= 0x11C2))) {
181 UV tindex = uv2 - Hangul_TBase0x11A7;
182 return(uv + tindex);
183 }
184 plane = UNF_compos[uv >> 16];
185 if (! plane)
186 return 0;
187 row = plane[(uv >> 8) & 0xff];
188 if (! row)
189 return 0;
190 cell = row[uv & 0xff];
191 if (! cell)
192 return 0;
193 for (i = cell; i->nextchar; i++) {
194 if (uv2 == i->nextchar)
195 return i->composite;
196 }
197 return 0;
198}
199
200static U8 getCombinClass(UV uv)
201{
202 U8 **plane, *row;
203 if (OVER_UTF_MAX(uv)((0x10ffff) < (uv)))
204 return 0;
205 plane = (U8**)UNF_combin[uv >> 16];
206 if (! plane)
207 return 0;
208 row = plane[(uv >> 8) & 0xff];
209 return row ? row[uv & 0xff] : 0;
210}
211
212static U8* pv_cat_decompHangul(pTHX_ U8* d, UV uv)
213{
214 UV sindex = uv - Hangul_SBase0xAC00;
215 UV lindex = sindex / Hangul_NCount588;
216 UV vindex = (sindex % Hangul_NCount588) / Hangul_TCount28;
217 UV tindex = sindex % Hangul_TCount28;
218
219 if (! Hangul_IsS(uv)((0xAC00 <= (uv)) && ((uv) <= 0xD7A3)))
220 return d;
221
222 d = uvchr_to_utf8(d, (lindex + Hangul_LBase))Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) (((lindex + 0x1100)
) | 0)),0,0)
;
223 d = uvchr_to_utf8(d, (vindex + Hangul_VBase))Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) (((vindex + 0x1161)
) | 0)),0,0)
;
224 if (tindex)
225 d = uvchr_to_utf8(d, (tindex + Hangul_TBase))Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) (((tindex + 0x11A7)
) | 0)),0,0)
;
226 return d;
227}
228
229static char* sv_2pvunicode(pTHX_ SV *sv, STRLEN *lp)
230{
231 char *s;
232 STRLEN len;
233 s = SvPV(sv,len)((((sv)->sv_flags & (0x00000400|0x00200000)) == 0x00000400
) ? ((len = ((XPV*) (sv)->sv_any)->xpv_cur), ((sv)->
sv_u.svu_pv)) : Perl_sv_2pv_flags( sv,&len,2))
;
234 if (!SvUTF8(sv)((sv)->sv_flags & 0x20000000)) {
235 SV* tmpsv = sv_2mortal(newSVpvn(s, len))Perl_sv_2mortal( Perl_newSVpvn( s,len));
236 if (!SvPOK(tmpsv)((tmpsv)->sv_flags & 0x00000400))
237 s = SvPV_force(tmpsv,len)((((tmpsv)->sv_flags & (0x00000400|0x00000100|0x00000200
|0x00000800|0x00008000|(0x08000000|0x00010000|0x00000800|0x01000000
|0x00800000|0x10000000)|0x00200000)) == 0x00000400) ? ((len =
((XPV*) (tmpsv)->sv_any)->xpv_cur), ((tmpsv)->sv_u.
svu_pv)) : Perl_sv_pvn_force_flags( tmpsv,&len,2))
;
Value stored to 's' is never read
238 sv_utf8_upgrade(tmpsv)Perl_sv_utf8_upgrade_flags_grow( tmpsv,2,0);
239 s = SvPV(tmpsv,len)((((tmpsv)->sv_flags & (0x00000400|0x00200000)) == 0x00000400
) ? ((len = ((XPV*) (tmpsv)->sv_any)->xpv_cur), ((tmpsv
)->sv_u.svu_pv)) : Perl_sv_2pv_flags( tmpsv,&len,2))
;
240 }
241 if (lp)
242 *lp = len;
243 return s;
244}
245
246static
247U8* pv_utf8_decompose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool_Bool iscompat)
248{
249 U8* p = s;
250 U8* e = s + slen;
251 U8* dstart = *dp;
252 U8* d = dstart;
253
254 while (p < e) {
255 STRLEN retlen;
256 UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(p, e - p, &retlen, (0|(0)|0|0), 0
, 0)
;
257 if (!retlen)
258 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "decompose");
259 p += retlen;
260
261 if (Hangul_IsS(uv)((0xAC00 <= (uv)) && ((uv) <= 0xD7A3))) {
262 Renew_d_if_not_enough_to(UTF8_MAXLEN * 3)STRLEN curlen = d - dstart; if (dlen < curlen + (13 * 3)) {
dlen += (13 * 3); (dstart = ((void)(__builtin_expect(((((( sizeof
(size_t) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 <<
8*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : (
(size_t)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool
)1 : (_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)),
(U8*)(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)
*sizeof(U8)))))); d = dstart + curlen; }
263 d = pv_cat_decompHangul(aTHX_ d, uv);
264 }
265 else {
266 U8* r = iscompat ? dec_compat(uv) : dec_canonical(uv);
267
268 if (r) {
269 STRLEN len = (STRLEN)strlen((char *)r);
270 Renew_d_if_not_enough_to(len)STRLEN curlen = d - dstart; if (dlen < curlen + (len)) { dlen
+= (len); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
271 while (len--)
272 *d++ = *r++;
273 }
274 else {
275 Renew_d_if_not_enough_to(UTF8_MAXLEN)STRLEN curlen = d - dstart; if (dlen < curlen + (13)) { dlen
+= (13); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
276 d = uvchr_to_utf8(d, uv)Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) ((uv) | 0)),0,0);
277 }
278 }
279 }
280 *dp = dstart;
281 return d;
282}
283
284static
285U8* pv_utf8_reorder(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen)
286{
287 U8* p = s;
288 U8* e = s + slen;
289 U8* dstart = *dp;
290 U8* d = dstart;
291
292 UNF_cc seq_ary[CC_SEQ_SIZE(10)];
293 UNF_cc* seq_ptr = seq_ary; /* use array at the beginning */
294 UNF_cc* seq_ext = NULL((void*)0); /* extend if need */
295 STRLEN seq_max = CC_SEQ_SIZE(10);
296 STRLEN cc_pos = 0;
297
298 while (p < e) {
299 U8 curCC;
300 STRLEN retlen;
301 UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(p, e - p, &retlen, (0|(0)|0|0), 0
, 0)
;
302 if (!retlen)
303 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "reorder");
304 p += retlen;
305
306 curCC = getCombinClass(uv);
307
308 if (curCC != 0) {
309 if (seq_max < cc_pos + 1) { /* extend if need */
310 seq_max = cc_pos + CC_SEQ_STEP(5); /* new size */
311 if (CC_SEQ_SIZE(10) == cc_pos) { /* seq_ary full */
312 STRLEN i;
313 New(0, seq_ext, seq_max, UNF_cc)(seq_ext = ((void)(__builtin_expect(((((( sizeof(size_t) <
sizeof(seq_max) || sizeof(UNF_cc) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(seq_max)))) ? (size_t)(seq_max) : (
(size_t)-1)/sizeof(UNF_cc)) > ((size_t)-1)/sizeof(UNF_cc))
) ? (_Bool)1 : (_Bool)0),(0)) && (Perl_croak_memory_wrap
(),0)), (UNF_cc*)(Perl_safesysmalloc((size_t)((seq_max)*sizeof
(UNF_cc))))))
;
314 for (i = 0; i < cc_pos; i++)
315 seq_ext[i] = seq_ary[i];
316 }
317 else {
318 Renew(seq_ext, seq_max, UNF_cc)(seq_ext = ((void)(__builtin_expect(((((( sizeof(size_t) <
sizeof(seq_max) || sizeof(UNF_cc) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(seq_max)))) ? (size_t)(seq_max) : (
(size_t)-1)/sizeof(UNF_cc)) > ((size_t)-1)/sizeof(UNF_cc))
) ? (_Bool)1 : (_Bool)0),(0)) && (Perl_croak_memory_wrap
(),0)), (UNF_cc*)(Perl_safesysrealloc((void *)(seq_ext),(size_t
)((seq_max)*sizeof(UNF_cc))))))
;
319 }
320 seq_ptr = seq_ext; /* use seq_ext from now */
321 }
322
323 seq_ptr[cc_pos].cc = curCC;
324 seq_ptr[cc_pos].uv = uv;
325 seq_ptr[cc_pos].pos = cc_pos;
326 ++cc_pos;
327
328 if (p < e)
329 continue;
330 }
331
332 /* output */
333 if (cc_pos) {
334 STRLEN i;
335
336 if (cc_pos > 1) /* reordered if there are two c.c.'s */
337 qsort((void*)seq_ptr, cc_pos, sizeof(UNF_cc), compare_cc);
338
339 for (i = 0; i < cc_pos; i++) {
340 Renew_d_if_not_enough_to(UTF8_MAXLEN)STRLEN curlen = d - dstart; if (dlen < curlen + (13)) { dlen
+= (13); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
341 d = uvchr_to_utf8(d, seq_ptr[i].uv)Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) ((seq_ptr[i].uv) | 0
)),0,0)
;
342 }
343 cc_pos = 0;
344 }
345
346 if (curCC == 0) {
347 Renew_d_if_not_enough_to(UTF8_MAXLEN)STRLEN curlen = d - dstart; if (dlen < curlen + (13)) { dlen
+= (13); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
348 d = uvchr_to_utf8(d, uv)Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) ((uv) | 0)),0,0);
349 }
350 }
351 if (seq_ext)
352 Safefree(seq_ext)Perl_safesysfree(((void *)(seq_ext)));
353 *dp = dstart;
354 return d;
355}
356
357static
358U8* pv_utf8_compose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool_Bool iscontig)
359{
360 U8* p = s;
361 U8* e = s + slen;
362 U8* dstart = *dp;
363 U8* d = dstart;
364
365 UV uvS = 0; /* code point of the starter */
366 bool_Bool valid_uvS = FALSE(0); /* if FALSE, uvS isn't initialized yet */
367 U8 preCC = 0;
368
369 UV seq_ary[CC_SEQ_SIZE(10)];
370 UV* seq_ptr = seq_ary; /* use array at the beginning */
371 UV* seq_ext = NULL((void*)0); /* extend if need */
372 STRLEN seq_max = CC_SEQ_SIZE(10);
373 STRLEN cc_pos = 0;
374
375 while (p < e) {
376 U8 curCC;
377 STRLEN retlen;
378 UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(p, e - p, &retlen, (0|(0)|0|0), 0
, 0)
;
379 if (!retlen)
380 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "compose");
381 p += retlen;
382
383 curCC = getCombinClass(uv);
384
385 if (!valid_uvS) {
386 if (curCC == 0) {
387 uvS = uv; /* the first Starter is found */
388 valid_uvS = TRUE(1);
389 if (p < e)
390 continue;
391 }
392 else {
393 Renew_d_if_not_enough_to(UTF8_MAXLEN)STRLEN curlen = d - dstart; if (dlen < curlen + (13)) { dlen
+= (13); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
394 d = uvchr_to_utf8(d, uv)Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) ((uv) | 0)),0,0);
395 continue;
396 }
397 }
398 else {
399 bool_Bool composed;
400
401 /* blocked */
402 if ((iscontig && cc_pos) || /* discontiguous combination */
403 (curCC != 0 && preCC == curCC) || /* blocked by same CC */
404 (preCC > curCC)) /* blocked by higher CC: revised D2 */
405 composed = FALSE(0);
406
407 /* not blocked:
408 iscontig && cc_pos == 0 -- contiguous combination
409 curCC == 0 && preCC == 0 -- starter + starter
410 curCC != 0 && preCC < curCC -- lower CC */
411 else {
412 /* try composition */
413 UV uvComp = composite_uv(uvS, uv);
414
415 if (uvComp && !isExclusion(uvComp)) {
416 uvS = uvComp;
417 composed = TRUE(1);
418
419 /* preCC should not be changed to curCC */
420 /* e.g. 1E14 = 0045 0304 0300 where CC(0304) == CC(0300) */
421 if (p < e)
422 continue;
423 }
424 else
425 composed = FALSE(0);
426 }
427
428 if (!composed) {
429 preCC = curCC;
430 if (curCC != 0 || !(p < e)) {
431 if (seq_max < cc_pos + 1) { /* extend if need */
432 seq_max = cc_pos + CC_SEQ_STEP(5); /* new size */
433 if (CC_SEQ_SIZE(10) == cc_pos) { /* seq_ary full */
434 New(0, seq_ext, seq_max, UV)(seq_ext = ((void)(__builtin_expect(((((( sizeof(size_t) <
sizeof(seq_max) || sizeof(UV) > ((size_t)1 << 8*(sizeof
(size_t) - sizeof(seq_max)))) ? (size_t)(seq_max) : ((size_t)
-1)/sizeof(UV)) > ((size_t)-1)/sizeof(UV))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (UV*)
(Perl_safesysmalloc((size_t)((seq_max)*sizeof(UV))))))
;
435 Copy(seq_ary, seq_ext, cc_pos, UV)((void)(__builtin_expect(((((( sizeof(size_t) < sizeof(cc_pos
) || sizeof(UV) > ((size_t)1 << 8*(sizeof(size_t) - sizeof
(cc_pos)))) ? (size_t)(cc_pos) : ((size_t)-1)/sizeof(UV)) >
((size_t)-1)/sizeof(UV))) ? (_Bool)1 : (_Bool)0),(0)) &&
(Perl_croak_memory_wrap(),0)), ((void)0), ((void)0), (void)memcpy
((char*)(seq_ext),(const char*)(seq_ary), (cc_pos) * sizeof(UV
)))
;
436 }
437 else {
438 Renew(seq_ext, seq_max, UV)(seq_ext = ((void)(__builtin_expect(((((( sizeof(size_t) <
sizeof(seq_max) || sizeof(UV) > ((size_t)1 << 8*(sizeof
(size_t) - sizeof(seq_max)))) ? (size_t)(seq_max) : ((size_t)
-1)/sizeof(UV)) > ((size_t)-1)/sizeof(UV))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (UV*)
(Perl_safesysrealloc((void *)(seq_ext),(size_t)((seq_max)*sizeof
(UV))))))
;
439 }
440 seq_ptr = seq_ext; /* use seq_ext from now */
441 }
442 seq_ptr[cc_pos] = uv;
443 ++cc_pos;
444 }
445 if (curCC != 0 && p < e)
446 continue;
447 }
448 }
449
450 /* output */
451 {
452 Renew_d_if_not_enough_to(UTF8_MAXLEN)STRLEN curlen = d - dstart; if (dlen < curlen + (13)) { dlen
+= (13); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
453 d = uvchr_to_utf8(d, uvS)Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) ((uvS) | 0)),0,0); /* starter (composed or not) */
454 }
455
456 if (cc_pos) {
457 STRLEN i;
458
459 for (i = 0; i < cc_pos; i++) {
460 Renew_d_if_not_enough_to(UTF8_MAXLEN)STRLEN curlen = d - dstart; if (dlen < curlen + (13)) { dlen
+= (13); (dstart = ((void)(__builtin_expect(((((( sizeof(size_t
) < sizeof(dlen+1) || sizeof(U8) > ((size_t)1 << 8
*(sizeof(size_t) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t
)-1)/sizeof(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (
_Bool)0),(0)) && (Perl_croak_memory_wrap(),0)), (U8*)
(Perl_safesysrealloc((void *)(dstart),(size_t)((dlen+1)*sizeof
(U8)))))); d = dstart + curlen; }
461 d = uvchr_to_utf8(d, seq_ptr[i])Perl_uvoffuni_to_utf8_flags_msgs( d,((UV) ((seq_ptr[i]) | 0))
,0,0)
;
462 }
463 cc_pos = 0;
464 }
465
466 uvS = uv;
467 }
468 if (seq_ext)
469 Safefree(seq_ext)Perl_safesysfree(((void *)(seq_ext)));
470 *dp = dstart;
471 return d;
472}
473
474#line 475 "Normalize.c"
475#ifndef PERL_UNUSED_VAR
476# define PERL_UNUSED_VAR(var)((void)sizeof(var)) if (0) var = var
477#endif
478
479#ifndef dVARstruct Perl___notused_struct
480# define dVARstruct Perl___notused_struct dNOOPstruct Perl___notused_struct
481#endif
482
483
484/* This stuff is not part of the API! You have been warned. */
485#ifndef PERL_VERSION_DECIMAL
486# define PERL_VERSION_DECIMAL(r,v,s)(r*1000000 + v*1000 + s) (r*1000000 + v*1000 + s)
487#endif
488#ifndef PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1)
489# define PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1) \
490 PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)(5*1000000 + 32*1000 + 1)
491#endif
492#ifndef PERL_VERSION_GE
493# define PERL_VERSION_GE(r,v,s)((5*1000000 + 32*1000 + 1) >= (r*1000000 + v*1000 + s)) \
494 (PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1) >= PERL_VERSION_DECIMAL(r,v,s)(r*1000000 + v*1000 + s))
495#endif
496#ifndef PERL_VERSION_LE
497# define PERL_VERSION_LE(r,v,s)((5*1000000 + 32*1000 + 1) <= (r*1000000 + v*1000 + s)) \
498 (PERL_DECIMAL_VERSION(5*1000000 + 32*1000 + 1) <= PERL_VERSION_DECIMAL(r,v,s)(r*1000000 + v*1000 + s))
499#endif
500
501/* XS_INTERNAL is the explicit static-linkage variant of the default
502 * XS macro.
503 *
504 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
505 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
506 * for anything but the BOOT XSUB.
507 *
508 * See XSUB.h in core!
509 */
510
511
512/* TODO: This might be compatible further back than 5.10.0. */
513#if PERL_VERSION_GE(5, 10, 0)((5*1000000 + 32*1000 + 1) >= (5*1000000 + 10*1000 + 0)) && PERL_VERSION_LE(5, 15, 1)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 15*1000 + 1))
514# undef XS_EXTERNAL
515# undef XS_INTERNAL
516# if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
517# define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) __declspec(dllexport) XSPROTO(name)void name( CV* cv __attribute__((unused)))
518# define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) STATICstatic XSPROTO(name)void name( CV* cv __attribute__((unused)))
519# endif
520# if defined(__SYMBIAN32__)
521# define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) EXPORT_C XSPROTO(name)void name( CV* cv __attribute__((unused)))
522# define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) EXPORT_C STATICstatic XSPROTO(name)void name( CV* cv __attribute__((unused)))
523# endif
524# ifndef XS_EXTERNAL
525# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
526# define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) void name(pTHX_ CV* cv __attribute__unused____attribute__((unused)))
527# define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) STATICstatic void name(pTHX_ CV* cv __attribute__unused____attribute__((unused)))
528# else
529# ifdef __cplusplus
530# define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) extern "C" XSPROTO(name)void name( CV* cv __attribute__((unused)))
531# define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) static XSPROTO(name)void name( CV* cv __attribute__((unused)))
532# else
533# define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) XSPROTO(name)void name( CV* cv __attribute__((unused)))
534# define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) STATICstatic XSPROTO(name)void name( CV* cv __attribute__((unused)))
535# endif
536# endif
537# endif
538#endif
539
540/* perl >= 5.10.0 && perl <= 5.15.1 */
541
542
543/* The XS_EXTERNAL macro is used for functions that must not be static
544 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
545 * macro defined, the best we can do is assume XS is the same.
546 * Dito for XS_INTERNAL.
547 */
548#ifndef XS_EXTERNAL
549# define XS_EXTERNAL(name)void name( CV* cv __attribute__((unused))) XS(name)void name( CV* cv __attribute__((unused)))
550#endif
551#ifndef XS_INTERNAL
552# define XS_INTERNAL(name)static void name( CV* cv __attribute__((unused))) XS(name)void name( CV* cv __attribute__((unused)))
553#endif
554
555/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
556 * internal macro that we're free to redefine for varying linkage due
557 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
558 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
559 */
560
561#undef XS_EUPXS
562#if defined(PERL_EUPXS_ALWAYS_EXPORT)
563# define XS_EUPXS(name)static void name( CV* cv __attribute__((unused))) XS_EXTERNAL(name)void name( CV* cv __attribute__((unused)))
564#else
565 /* default to internal */
566# define XS_EUPXS(name)static void name( CV* cv __attribute__((unused))) XS_INTERNAL(name)static void name( CV* cv __attribute__((unused)))
567#endif
568
569#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0)
570#define PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0) assert(cv)((void)0); assert(params)((void)0)
571
572/* prototype to pass -Wmissing-prototypes */
573STATICstatic void
574S_croak_xs_usage(const CV *const cv, const char *const params);
575
576STATICstatic void
577S_croak_xs_usage(const CV *const cv, const char *const params)
578{
579 const GV *const gv = CvGV(cv)Perl_CvGV( (CV *)(cv));
580
581 PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0);
582
583 if (gv) {
584 const char *const gvname = GvNAME(gv)((((XPVGV*)(gv)->sv_any)->xiv_u.xivu_namehek))->hek_key;
585 const HV *const stash = GvSTASH(gv)(((XPVGV*)(gv)->sv_any)->xnv_u.xgv_stash);
586 const char *const hvname = stash ? HvNAME(stash)((((stash)->sv_flags & 0x02000000) && ((struct
xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV*) (stash
)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_name &&
( ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV
*) (stash)->sv_any)->xhv_max+1]))->xhv_name_count ? *
((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV
*) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_names
: ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV
*) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_name
)) ? (( ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash
)[((XPVHV*) (stash)->sv_any)->xhv_max+1]))->xhv_name_count
? *((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV
*) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_names
: ((struct xpvhv_aux*)&(((stash)->sv_u.svu_hash)[((XPVHV
*) (stash)->sv_any)->xhv_max+1]))->xhv_name_u.xhvnameu_name
))->hek_key : ((void*)0))
: NULL((void*)0);
587
588 if (hvname)
589 Perl_croak_nocontextPerl_croak("Usage: %s::%s(%s)", hvname, gvname, params);
590 else
591 Perl_croak_nocontextPerl_croak("Usage: %s(%s)", gvname, params);
592 } else {
593 /* Pants. I don't think that it should be possible to get here. */
594 Perl_croak_nocontextPerl_croak("Usage: CODE(0x%" UVxf"lx" ")(%s)", PTR2UV(cv)(UV)(cv), params);
595 }
596}
597#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE((void)0); ((void)0)
598
599#define croak_xs_usagePerl_croak_xs_usage S_croak_xs_usage
600
601#endif
602
603/* NOTE: the prototype of newXSproto() is different in versions of perls,
604 * so we define a portable version of newXSproto()
605 */
606#ifdef newXS_flags
607#define newXSproto_portable(name, c_impl, file, proto)Perl_newXS_flags( name,c_impl,file,proto,0) newXS_flags(name, c_impl, file, proto, 0)Perl_newXS_flags( name,c_impl,file,proto,0)
608#else
609#define newXSproto_portable(name, c_impl, file, proto)Perl_newXS_flags( name,c_impl,file,proto,0) (PL_Sv=(SV*)newXS(name, c_impl, file)Perl_newXS( name,c_impl,file), sv_setpv(PL_Sv, proto)Perl_sv_setpv( PL_Sv,proto), (CV*)PL_Sv)
610#endif /* !defined(newXS_flags) */
611
612#if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5))
613# define newXS_deffile(a,b)Perl_newXS_deffile( a,b) Perl_newXS(aTHX_ a,b,file)
614#else
615# define newXS_deffile(a,b)Perl_newXS_deffile( a,b) Perl_newXS_deffile(aTHX_ a,b)
616#endif
617
618#line 619 "Normalize.c"
619
620XS_EUPXS(XS_Unicode__Normalize_decompose)static void XS_Unicode__Normalize_decompose( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
621XS_EUPXS(XS_Unicode__Normalize_decompose)static void XS_Unicode__Normalize_decompose( CV* cv __attribute__
((unused)))
622{
623 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
624 if (items < 1 || items > 2)
625 croak_xs_usagePerl_croak_xs_usage(cv, "src, compat = &PL_sv_no");
626 {
627 SV * src = ST(0)PL_stack_base[ax + (0)]
628;
629 SV * compat;
630#line 473 "Normalize.xs"
631 SV* dst;
632 U8 *s, *d, *dend;
633 STRLEN slen, dlen;
634#line 635 "Normalize.c"
635 SV * RETVAL;
636
637 if (items < 2)
638 compat = &PL_sv_no(PL_sv_immortals[2]);
639 else {
640 compat = ST(1)PL_stack_base[ax + (1)]
641;
642 }
643#line 477 "Normalize.xs"
644 s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
645 dst = newSVpvn("", 0)Perl_newSVpvn( "",0);
646 dlen = slen;
647 New(0, d, dlen+1, U8)(d = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(dlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((dlen+1)*sizeof(U8))))))
;
648 dend = pv_utf8_decompose(aTHX_ s, slen, &d, dlen, (bool_Bool)SvTRUE(compat)Perl_SvTRUE( compat));
649 sv_setpvn(dst, (char *)d, dend - d)Perl_sv_setpvn( dst,(char *)d,dend - d);
650 SvUTF8_on(dst)((dst)->sv_flags |= (0x20000000));
651 Safefree(d)Perl_safesysfree(((void *)(d)));
652 RETVAL = dst;
653#line 654 "Normalize.c"
654 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
655 ST(0)PL_stack_base[ax + (0)] = RETVAL;
656 }
657 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
658}
659
660
661XS_EUPXS(XS_Unicode__Normalize_reorder)static void XS_Unicode__Normalize_reorder( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
662XS_EUPXS(XS_Unicode__Normalize_reorder)static void XS_Unicode__Normalize_reorder( CV* cv __attribute__
((unused)))
663{
664 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
665 if (items != 1)
666 croak_xs_usagePerl_croak_xs_usage(cv, "src");
667 {
668 SV * src = ST(0)PL_stack_base[ax + (0)]
669;
670#line 495 "Normalize.xs"
671 SV* dst;
672 U8 *s, *d, *dend;
673 STRLEN slen, dlen;
674#line 675 "Normalize.c"
675 SV * RETVAL;
676#line 499 "Normalize.xs"
677 s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
678 dst = newSVpvn("", 0)Perl_newSVpvn( "",0);
679 dlen = slen;
680 New(0, d, dlen+1, U8)(d = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(dlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((dlen+1)*sizeof(U8))))))
;
681 dend = pv_utf8_reorder(aTHX_ s, slen, &d, dlen);
682 sv_setpvn(dst, (char *)d, dend - d)Perl_sv_setpvn( dst,(char *)d,dend - d);
683 SvUTF8_on(dst)((dst)->sv_flags |= (0x20000000));
684 Safefree(d)Perl_safesysfree(((void *)(d)));
685 RETVAL = dst;
686#line 687 "Normalize.c"
687 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
688 ST(0)PL_stack_base[ax + (0)] = RETVAL;
689 }
690 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
691}
692
693
694XS_EUPXS(XS_Unicode__Normalize_compose)static void XS_Unicode__Normalize_compose( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
695XS_EUPXS(XS_Unicode__Normalize_compose)static void XS_Unicode__Normalize_compose( CV* cv __attribute__
((unused)))
696{
697 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
698 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
699 if (items != 1)
700 croak_xs_usagePerl_croak_xs_usage(cv, "src");
701 {
702 SV * src = ST(0)PL_stack_base[ax + (0)]
703;
704#line 519 "Normalize.xs"
705 SV* dst;
706 U8 *s, *d, *dend;
707 STRLEN slen, dlen;
708#line 709 "Normalize.c"
709 SV * RETVAL;
710#line 523 "Normalize.xs"
711 s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
712 dst = newSVpvn("", 0)Perl_newSVpvn( "",0);
713 dlen = slen;
714 New(0, d, dlen+1, U8)(d = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(dlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((dlen+1)*sizeof(U8))))))
;
715 dend = pv_utf8_compose(aTHX_ s, slen, &d, dlen, (bool_Bool)ix);
716 sv_setpvn(dst, (char *)d, dend - d)Perl_sv_setpvn( dst,(char *)d,dend - d);
717 SvUTF8_on(dst)((dst)->sv_flags |= (0x20000000));
718 Safefree(d)Perl_safesysfree(((void *)(d)));
719 RETVAL = dst;
720#line 721 "Normalize.c"
721 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
722 ST(0)PL_stack_base[ax + (0)] = RETVAL;
723 }
724 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
725}
726
727
728XS_EUPXS(XS_Unicode__Normalize_NFD)static void XS_Unicode__Normalize_NFD( CV* cv __attribute__((
unused)))
; /* prototype to pass -Wmissing-prototypes */
729XS_EUPXS(XS_Unicode__Normalize_NFD)static void XS_Unicode__Normalize_NFD( CV* cv __attribute__((
unused)))
730{
731 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
732 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
733 if (items != 1)
734 croak_xs_usagePerl_croak_xs_usage(cv, "src");
735 {
736 SV * src = ST(0)PL_stack_base[ax + (0)]
737;
738#line 543 "Normalize.xs"
739 SV *dst;
740 U8 *s, *t, *tend, *d, *dend;
741 STRLEN slen, tlen, dlen;
742#line 743 "Normalize.c"
743 SV * RETVAL;
744#line 547 "Normalize.xs"
745 s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
746
747 /* decompose */
748 tlen = slen;
749 New(0, t, tlen+1, U8)(t = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(tlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(tlen+1)))) ? (size_t)(tlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((tlen+1)*sizeof(U8))))))
;
750 tend = pv_utf8_decompose(aTHX_ s, slen, &t, tlen, (bool_Bool)(ix==1));
751 *tend = '\0';
752 tlen = tend - t; /* no longer know real size of t */
753
754 /* reorder */
755 dlen = tlen;
756 New(0, d, dlen+1, U8)(d = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(dlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((dlen+1)*sizeof(U8))))))
;
757 dend = pv_utf8_reorder(aTHX_ t, tlen, &d, dlen);
758 *dend = '\0';
759 dlen = dend - d; /* no longer know real size of d */
760
761 /* return */
762 dst = newSVpvn("", 0)Perl_newSVpvn( "",0);
763 sv_setpvn(dst, (char *)d, dlen)Perl_sv_setpvn( dst,(char *)d,dlen);
764 SvUTF8_on(dst)((dst)->sv_flags |= (0x20000000));
765
766 Safefree(t)Perl_safesysfree(((void *)(t)));
767 Safefree(d)Perl_safesysfree(((void *)(d)));
768 RETVAL = dst;
769#line 770 "Normalize.c"
770 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
771 ST(0)PL_stack_base[ax + (0)] = RETVAL;
772 }
773 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
774}
775
776
777XS_EUPXS(XS_Unicode__Normalize_NFC)static void XS_Unicode__Normalize_NFC( CV* cv __attribute__((
unused)))
; /* prototype to pass -Wmissing-prototypes */
778XS_EUPXS(XS_Unicode__Normalize_NFC)static void XS_Unicode__Normalize_NFC( CV* cv __attribute__((
unused)))
779{
780 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
781 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
782 if (items != 1)
783 croak_xs_usagePerl_croak_xs_usage(cv, "src");
784 {
785 SV * src = ST(0)PL_stack_base[ax + (0)]
786;
787#line 583 "Normalize.xs"
788 SV *dst;
789 U8 *s, *t, *tend, *u, *uend, *d, *dend;
790 STRLEN slen, tlen, ulen, dlen;
791#line 792 "Normalize.c"
792 SV * RETVAL;
793#line 587 "Normalize.xs"
794 s = (U8*)sv_2pvunicode(aTHX_ src,&slen);
795
796 /* decompose */
797 tlen = slen;
798 New(0, t, tlen+1, U8)(t = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(tlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(tlen+1)))) ? (size_t)(tlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((tlen+1)*sizeof(U8))))))
;
799 tend = pv_utf8_decompose(aTHX_ s, slen, &t, tlen, (bool_Bool)(ix==1));
800 *tend = '\0';
801 tlen = tend - t; /* no longer know real size of t */
802
803 /* reorder */
804 ulen = tlen;
805 New(0, u, ulen+1, U8)(u = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(ulen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(ulen+1)))) ? (size_t)(ulen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((ulen+1)*sizeof(U8))))))
;
806 uend = pv_utf8_reorder(aTHX_ t, tlen, &u, ulen);
807 *uend = '\0';
808 ulen = uend - u; /* no longer know real size of u */
809
810 /* compose */
811 dlen = ulen;
812 New(0, d, dlen+1, U8)(d = ((void)(__builtin_expect(((((( sizeof(size_t) < sizeof
(dlen+1) || sizeof(U8) > ((size_t)1 << 8*(sizeof(size_t
) - sizeof(dlen+1)))) ? (size_t)(dlen+1) : ((size_t)-1)/sizeof
(U8)) > ((size_t)-1)/sizeof(U8))) ? (_Bool)1 : (_Bool)0),(
0)) && (Perl_croak_memory_wrap(),0)), (U8*)(Perl_safesysmalloc
((size_t)((dlen+1)*sizeof(U8))))))
;
813 dend = pv_utf8_compose(aTHX_ u, ulen, &d, dlen, (bool_Bool)(ix==2));
814 *dend = '\0';
815 dlen = dend - d; /* no longer know real size of d */
816
817 /* return */
818 dst = newSVpvn("", 0)Perl_newSVpvn( "",0);
819 sv_setpvn(dst, (char *)d, dlen)Perl_sv_setpvn( dst,(char *)d,dlen);
820 SvUTF8_on(dst)((dst)->sv_flags |= (0x20000000));
821
822 Safefree(t)Perl_safesysfree(((void *)(t)));
823 Safefree(u)Perl_safesysfree(((void *)(u)));
824 Safefree(d)Perl_safesysfree(((void *)(d)));
825 RETVAL = dst;
826#line 827 "Normalize.c"
827 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
828 ST(0)PL_stack_base[ax + (0)] = RETVAL;
829 }
830 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
831}
832
833
834XS_EUPXS(XS_Unicode__Normalize_checkNFD)static void XS_Unicode__Normalize_checkNFD( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
835XS_EUPXS(XS_Unicode__Normalize_checkNFD)static void XS_Unicode__Normalize_checkNFD( CV* cv __attribute__
((unused)))
836{
837 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
838 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
839 if (items != 1)
840 croak_xs_usagePerl_croak_xs_usage(cv, "src");
841 {
842 SV * src = ST(0)PL_stack_base[ax + (0)]
843;
844#line 630 "Normalize.xs"
845 STRLEN srclen, retlen;
846 U8 *s, *e, *p, curCC, preCC;
847 bool_Bool result = TRUE(1);
848#line 849 "Normalize.c"
849 SV * RETVAL;
850#line 634 "Normalize.xs"
851 s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
852 e = s + srclen;
853
854 preCC = 0;
855 for (p = s; p < e; p += retlen) {
856 UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(p, e - p, &retlen, (0|(0)|0|0), 0
, 0)
;
857 if (!retlen)
858 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "checkNFD or -NFKD");
859
860 curCC = getCombinClass(uv);
861 if (preCC > curCC && curCC != 0) { /* canonical ordering violated */
862 result = FALSE(0);
863 break;
864 }
865 if (Hangul_IsS(uv)((0xAC00 <= (uv)) && ((uv) <= 0xD7A3)) || (ix ? dec_compat(uv) : dec_canonical(uv))) {
866 result = FALSE(0);
867 break;
868 }
869 preCC = curCC;
870 }
871 RETVAL = boolSV(result)((result) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
872#line 873 "Normalize.c"
873 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
874 ST(0)PL_stack_base[ax + (0)] = RETVAL;
875 }
876 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
877}
878
879
880XS_EUPXS(XS_Unicode__Normalize_checkNFC)static void XS_Unicode__Normalize_checkNFC( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
881XS_EUPXS(XS_Unicode__Normalize_checkNFC)static void XS_Unicode__Normalize_checkNFC( CV* cv __attribute__
((unused)))
882{
883 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
884 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
885 if (items != 1)
886 croak_xs_usagePerl_croak_xs_usage(cv, "src");
887 {
888 SV * src = ST(0)PL_stack_base[ax + (0)]
889;
890#line 666 "Normalize.xs"
891 STRLEN srclen, retlen;
892 U8 *s, *e, *p, curCC, preCC;
893 bool_Bool result = TRUE(1);
894 bool_Bool isMAYBE = FALSE(0);
895#line 896 "Normalize.c"
896 SV * RETVAL;
897#line 671 "Normalize.xs"
898 s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
899 e = s + srclen;
900
901 preCC = 0;
902 for (p = s; p < e; p += retlen) {
903 UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(p, e - p, &retlen, (0|(0)|0|0), 0
, 0)
;
904 if (!retlen)
905 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "checkNFC or -NFKC");
906
907 curCC = getCombinClass(uv);
908 if (preCC > curCC && curCC != 0) { /* canonical ordering violated */
909 result = FALSE(0);
910 break;
911 }
912
913 /* get NFC/NFKC property */
914 if (Hangul_IsS(uv)((0xAC00 <= (uv)) && ((uv) <= 0xD7A3))) /* Hangul syllables are canonical composites */
915 ; /* YES */
916 else if (isExclusion(uv) || isSingleton(uv) || isNonStDecomp(uv)) {
917 result = FALSE(0);
918 break;
919 }
920 else if (isComp2nd(uv))
921 isMAYBE = TRUE(1);
922 else if (ix) {
923 char *canon, *compat;
924 /* NFKC_NO when having compatibility mapping. */
925 canon = (char *) dec_canonical(uv);
926 compat = (char *) dec_compat(uv);
927 if (compat && !(canon && strEQ(canon, compat)(strcmp(canon,compat) == 0))) {
928 result = FALSE(0);
929 break;
930 }
931 } /* end of get NFC/NFKC property */
932
933 preCC = curCC;
934 }
935 if (isMAYBE && result) /* NO precedes MAYBE */
936 XSRETURN_UNDEFdo { (PL_stack_base[ax + (0)] = &(PL_sv_immortals[1])); do
{ const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0); } while (0)
;
937 RETVAL = boolSV(result)((result) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
938#line 939 "Normalize.c"
939 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
940 ST(0)PL_stack_base[ax + (0)] = RETVAL;
941 }
942 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
943}
944
945
946XS_EUPXS(XS_Unicode__Normalize_checkFCD)static void XS_Unicode__Normalize_checkFCD( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
947XS_EUPXS(XS_Unicode__Normalize_checkFCD)static void XS_Unicode__Normalize_checkFCD( CV* cv __attribute__
((unused)))
948{
949 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
950 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
951 if (items != 1)
952 croak_xs_usagePerl_croak_xs_usage(cv, "src");
953 {
954 SV * src = ST(0)PL_stack_base[ax + (0)]
955;
956#line 722 "Normalize.xs"
957 STRLEN srclen, retlen;
958 U8 *s, *e, *p, curCC, preCC;
959 bool_Bool result = TRUE(1);
960 bool_Bool isMAYBE = FALSE(0);
961#line 962 "Normalize.c"
962 SV * RETVAL;
963#line 727 "Normalize.xs"
964 s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
965 e = s + srclen;
966 preCC = 0;
967 for (p = s; p < e; p += retlen) {
968 U8 *sCan;
969 UV uvLead;
970 STRLEN canlen = 0;
971 UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(p, e - p, &retlen, (0|(0)|0|0), 0
, 0)
;
972 if (!retlen)
973 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "checkFCD or -FCC");
974
975 sCan = (U8*) dec_canonical(uv);
976
977 if (sCan) {
978 STRLEN canret;
979 canlen = (STRLEN)strlen((char *) sCan);
980 uvLead = utf8n_to_uvchr(sCan, canlen, &canret, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(sCan, canlen, &canret, (0|(0)|0|
0), 0, 0)
;
981 if (!canret)
982 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "checkFCD or -FCC");
983 }
984 else {
985 uvLead = uv;
986 }
987
988 curCC = getCombinClass(uvLead);
989
990 if (curCC != 0 && curCC < preCC) { /* canonical ordering violated */
991 result = FALSE(0);
992 break;
993 }
994
995 if (ix) {
996 if (isExclusion(uv) || isSingleton(uv) || isNonStDecomp(uv)) {
997 result = FALSE(0);
998 break;
999 }
1000 else if (isComp2nd(uv))
1001 isMAYBE = TRUE(1);
1002 }
1003
1004 if (sCan) {
1005 STRLEN canret;
1006 UV uvTrail;
1007 U8* eCan = sCan + canlen;
1008 U8* pCan = utf8_hopPerl_utf8_hop(eCan, -1);
1009 if (pCan < sCan)
1010 croakPerl_croak(ErrHopBeforeStart"panic (Unicode::Normalize): hopping before start");
1011 uvTrail = utf8n_to_uvchr(pCan, eCan - pCan, &canret, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(pCan, eCan - pCan, &canret, (0|(
0)|0|0), 0, 0)
;
1012 if (!canret)
1013 croakPerl_croak(ErrRetlenIsZero"panic (Unicode::Normalize %s): zero-length character", "checkFCD or -FCC");
1014 preCC = getCombinClass(uvTrail);
1015 }
1016 else {
1017 preCC = curCC;
1018 }
1019 }
1020 if (isMAYBE && result) /* NO precedes MAYBE */
1021 XSRETURN_UNDEFdo { (PL_stack_base[ax + (0)] = &(PL_sv_immortals[1])); do
{ const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0); } while (0)
;
1022 RETVAL = boolSV(result)((result) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
1023#line 1024 "Normalize.c"
1024 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
1025 ST(0)PL_stack_base[ax + (0)] = RETVAL;
1026 }
1027 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1028}
1029
1030
1031XS_EUPXS(XS_Unicode__Normalize_getCombinClass)static void XS_Unicode__Normalize_getCombinClass( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1032XS_EUPXS(XS_Unicode__Normalize_getCombinClass)static void XS_Unicode__Normalize_getCombinClass( CV* cv __attribute__
((unused)))
1033{
1034 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1035 if (items != 1)
1036 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1037 {
1038 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1039;
1040 U8 RETVAL;
1041 dXSTARGSV * const targ = ((PL_op->op_private & 0x04) ? (PL_curpad
[PL_op->op_targ]) : Perl_sv_newmortal())
;
1042
1043 RETVAL = getCombinClass(uv);
1044 XSprePUSH(sp = PL_stack_base + ax - 1); PUSHu((UV)RETVAL)do { do { UV TARGu_uv = (UV)RETVAL; if (__builtin_expect(((((
(targ)->sv_flags & (0xff|(0x08000000|0x00010000|0x00000800
|0x01000000 |0x00800000|0x10000000)|0x80000000)) == SVt_IV) &
(1 ? !(((__builtin_expect(((PL_tainted) ? (_Bool)1 : (_Bool)
0),(0))) ? (_Bool)1 : (_Bool)0)) : 1) & (TARGu_uv <= (
UV)((IV) ((~(UV)0) >> 1)))) ? (_Bool)1 : (_Bool)0),(1))
) { ((void)0); (targ)->sv_flags |= (0x00000100|0x00001000)
; targ->sv_u.svu_iv = TARGu_uv; } else Perl_sv_setuv_mg( targ
,TARGu_uv); } while (0); (*++sp = (targ)); } while (0)
;
1045 }
1046 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1047}
1048
1049
1050XS_EUPXS(XS_Unicode__Normalize_isExclusion)static void XS_Unicode__Normalize_isExclusion( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1051XS_EUPXS(XS_Unicode__Normalize_isExclusion)static void XS_Unicode__Normalize_isExclusion( CV* cv __attribute__
((unused)))
1052{
1053 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1054 if (items != 1)
1055 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1056 {
1057 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1058;
1059 bool_Bool RETVAL;
1060
1061 RETVAL = isExclusion(uv);
1062 ST(0)PL_stack_base[ax + (0)] = boolSV(RETVAL)((RETVAL) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
1063 }
1064 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1065}
1066
1067
1068XS_EUPXS(XS_Unicode__Normalize_isSingleton)static void XS_Unicode__Normalize_isSingleton( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1069XS_EUPXS(XS_Unicode__Normalize_isSingleton)static void XS_Unicode__Normalize_isSingleton( CV* cv __attribute__
((unused)))
1070{
1071 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1072 if (items != 1)
1073 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1074 {
1075 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1076;
1077 bool_Bool RETVAL;
1078
1079 RETVAL = isSingleton(uv);
1080 ST(0)PL_stack_base[ax + (0)] = boolSV(RETVAL)((RETVAL) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
1081 }
1082 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1083}
1084
1085
1086XS_EUPXS(XS_Unicode__Normalize_isNonStDecomp)static void XS_Unicode__Normalize_isNonStDecomp( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1087XS_EUPXS(XS_Unicode__Normalize_isNonStDecomp)static void XS_Unicode__Normalize_isNonStDecomp( CV* cv __attribute__
((unused)))
1088{
1089 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1090 if (items != 1)
1091 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1092 {
1093 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1094;
1095 bool_Bool RETVAL;
1096
1097 RETVAL = isNonStDecomp(uv);
1098 ST(0)PL_stack_base[ax + (0)] = boolSV(RETVAL)((RETVAL) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
1099 }
1100 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1101}
1102
1103
1104XS_EUPXS(XS_Unicode__Normalize_isComp2nd)static void XS_Unicode__Normalize_isComp2nd( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1105XS_EUPXS(XS_Unicode__Normalize_isComp2nd)static void XS_Unicode__Normalize_isComp2nd( CV* cv __attribute__
((unused)))
1106{
1107 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1108 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
1109 if (items != 1)
1110 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1111 {
1112 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1113;
1114 bool_Bool RETVAL;
1115#line 818 "Normalize.xs"
1116 PERL_UNUSED_VAR(ix)((void)sizeof(ix));
1117#line 1118 "Normalize.c"
1118
1119 RETVAL = isComp2nd(uv);
1120 ST(0)PL_stack_base[ax + (0)] = boolSV(RETVAL)((RETVAL) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
1121 }
1122 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1123}
1124
1125
1126XS_EUPXS(XS_Unicode__Normalize_isNFD_NO)static void XS_Unicode__Normalize_isNFD_NO( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1127XS_EUPXS(XS_Unicode__Normalize_isNFD_NO)static void XS_Unicode__Normalize_isNFD_NO( CV* cv __attribute__
((unused)))
1128{
1129 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1130 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
1131 if (items != 1)
1132 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1133 {
1134 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1135;
1136#line 827 "Normalize.xs"
1137 bool_Bool result = FALSE(0);
1138#line 1139 "Normalize.c"
1139 SV * RETVAL;
1140#line 829 "Normalize.xs"
1141 if (Hangul_IsS(uv)((0xAC00 <= (uv)) && ((uv) <= 0xD7A3)) || (ix ? dec_compat(uv) : dec_canonical(uv)))
1142 result = TRUE(1); /* NFD_NO or NFKD_NO */
1143 RETVAL = boolSV(result)((result) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
1144#line 1145 "Normalize.c"
1145 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
1146 ST(0)PL_stack_base[ax + (0)] = RETVAL;
1147 }
1148 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1149}
1150
1151
1152XS_EUPXS(XS_Unicode__Normalize_isComp_Ex)static void XS_Unicode__Normalize_isComp_Ex( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1153XS_EUPXS(XS_Unicode__Normalize_isComp_Ex)static void XS_Unicode__Normalize_isComp_Ex( CV* cv __attribute__
((unused)))
1154{
1155 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1156 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
1157 if (items != 1)
1158 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1159 {
1160 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1161;
1162#line 844 "Normalize.xs"
1163 bool_Bool result = FALSE(0);
1164#line 1165 "Normalize.c"
1165 SV * RETVAL;
1166#line 846 "Normalize.xs"
1167 if (isExclusion(uv) || isSingleton(uv) || isNonStDecomp(uv))
1168 result = TRUE(1); /* NFC_NO or NFKC_NO */
1169 else if (ix) {
1170 char *canon, *compat;
1171 canon = (char *) dec_canonical(uv);
1172 compat = (char *) dec_compat(uv);
1173 if (compat && (!canon || strNE(canon, compat)(strcmp(canon,compat) != 0)))
1174 result = TRUE(1); /* NFC_NO or NFKC_NO */
1175 }
1176 RETVAL = boolSV(result)((result) ? &(PL_sv_immortals[0]) : &(PL_sv_immortals
[2]))
;
1177#line 1178 "Normalize.c"
1178 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
1179 ST(0)PL_stack_base[ax + (0)] = RETVAL;
1180 }
1181 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1182}
1183
1184
1185XS_EUPXS(XS_Unicode__Normalize_getComposite)static void XS_Unicode__Normalize_getComposite( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1186XS_EUPXS(XS_Unicode__Normalize_getComposite)static void XS_Unicode__Normalize_getComposite( CV* cv __attribute__
((unused)))
1187{
1188 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1189 if (items != 2)
1190 croak_xs_usagePerl_croak_xs_usage(cv, "uv, uv2");
1191 {
1192 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1193;
1194 UV uv2 = (UV)SvUV(ST(1))((((PL_stack_base[ax + (1)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (1)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (1)],2))
1195;
1196#line 865 "Normalize.xs"
1197 UV composite;
1198#line 1199 "Normalize.c"
1199 SV * RETVAL;
1200#line 867 "Normalize.xs"
1201 composite = composite_uv(uv, uv2);
1202 RETVAL = composite ? newSVuv(composite)Perl_newSVuv( composite) : &PL_sv_undef(PL_sv_immortals[1]);
1203#line 1204 "Normalize.c"
1204 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
1205 ST(0)PL_stack_base[ax + (0)] = RETVAL;
1206 }
1207 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1208}
1209
1210
1211XS_EUPXS(XS_Unicode__Normalize_getCanon)static void XS_Unicode__Normalize_getCanon( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1212XS_EUPXS(XS_Unicode__Normalize_getCanon)static void XS_Unicode__Normalize_getCanon( CV* cv __attribute__
((unused)))
1213{
1214 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1215 dXSI32I32 ix = ((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->
xcv_start_u.xcv_xsubany.any_i32
;
1216 if (items != 1)
1217 croak_xs_usagePerl_croak_xs_usage(cv, "uv");
1218 {
1219 UV uv = (UV)SvUV(ST(0))((((PL_stack_base[ax + (0)])->sv_flags & (0x00000100|0x80000000
|0x00200000)) == (0x00000100|0x80000000)) ? ((XPVUV*) (PL_stack_base
[ax + (0)])->sv_any)->xuv_u.xivu_uv : Perl_sv_2uv_flags
( PL_stack_base[ax + (0)],2))
1220;
1221 SV * RETVAL;
1222#line 881 "Normalize.xs"
1223 if (Hangul_IsS(uv)((0xAC00 <= (uv)) && ((uv) <= 0xD7A3))) {
1224 U8 tmp[3 * UTF8_MAXLEN13 + 1];
1225 U8 *t = tmp;
1226 U8 *e = pv_cat_decompHangul(aTHX_ t, uv);
1227 RETVAL = newSVpvn((char *)t, e - t)Perl_newSVpvn( (char *)t,e - t);
1228 } else {
1229 U8* rstr = ix ? dec_compat(uv) : dec_canonical(uv);
1230 if (!rstr)
1231 XSRETURN_UNDEFdo { (PL_stack_base[ax + (0)] = &(PL_sv_immortals[1])); do
{ const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0); } while (0)
;
1232 RETVAL = newSVpvn((char *)rstr, strlen((char *)rstr))Perl_newSVpvn( (char *)rstr,strlen((char *)rstr));
1233 }
1234 SvUTF8_on(RETVAL)((RETVAL)->sv_flags |= (0x20000000));
1235#line 1236 "Normalize.c"
1236 RETVAL = sv_2mortal(RETVAL)Perl_sv_2mortal( RETVAL);
1237 ST(0)PL_stack_base[ax + (0)] = RETVAL;
1238 }
1239 XSRETURN(1)do { const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0)
;
1240}
1241
1242
1243XS_EUPXS(XS_Unicode__Normalize_splitOnLastStarter)static void XS_Unicode__Normalize_splitOnLastStarter( CV* cv __attribute__
((unused)))
; /* prototype to pass -Wmissing-prototypes */
1244XS_EUPXS(XS_Unicode__Normalize_splitOnLastStarter)static void XS_Unicode__Normalize_splitOnLastStarter( CV* cv __attribute__
((unused)))
1245{
1246 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1247 if (items != 1)
1248 croak_xs_usagePerl_croak_xs_usage(cv, "src");
1249 PERL_UNUSED_VAR(ax)((void)sizeof(ax)); /* -Wall */
1250 SPsp -= items;
1251 {
1252 SV * src = ST(0)PL_stack_base[ax + (0)]
1253;
1254#line 901 "Normalize.xs"
1255 SV *svp;
1256 STRLEN srclen;
1257 U8 *s, *e, *p;
1258#line 1259 "Normalize.c"
1259#line 905 "Normalize.xs"
1260 s = (U8*)sv_2pvunicode(aTHX_ src,&srclen);
1261 e = s + srclen;
1262 p = e;
1263 while (s < p) {
1264 UV uv;
1265 p = utf8_hopPerl_utf8_hop(p, -1);
1266 if (p < s)
1267 croakPerl_croak(ErrHopBeforeStart"panic (Unicode::Normalize): hopping before start");
1268 uv = utf8n_to_uvchr(p, e - p, NULL, AllowAnyUTF)Perl_utf8n_to_uvchr_msgs(p, e - p, ((void*)0), (0|(0)|0|0), 0
, 0)
;
1269 if (getCombinClass(uv) == 0) /* Last Starter found */
1270 break;
1271 }
1272
1273 svp = sv_2mortal(newSVpvn((char*)s, p - s))Perl_sv_2mortal( Perl_newSVpvn( (char*)s,p - s));
1274 SvUTF8_on(svp)((svp)->sv_flags |= (0x20000000));
1275 XPUSHs(svp)do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max
- (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow
( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t)
(1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); *
++sp = (svp); } while (0)
;
1276
1277 svp = sv_2mortal(newSVpvn((char*)p, e - p))Perl_sv_2mortal( Perl_newSVpvn( (char*)p,e - p));
1278 SvUTF8_on(svp)((svp)->sv_flags |= (0x20000000));
1279 XPUSHs(svp)do { do { (void)0; if (__builtin_expect(((((1) < 0 || PL_stack_max
- (sp) < (1))) ? (_Bool)1 : (_Bool)0),(0))) { sp = Perl_stack_grow
( sp,sp,(sizeof(1) > sizeof(ssize_t) && ((ssize_t)
(1) != (1)) ? -1 : (1))); ((void)sizeof(sp)); } } while (0); *
++sp = (svp); } while (0)
;
1280#line 1281 "Normalize.c"
1281 PUTBACKPL_stack_sp = sp;
1282 return;
1283 }
1284}
1285
1286#ifdef __cplusplus
1287extern "C"
1288#endif
1289XS_EXTERNAL(boot_Unicode__Normalize)void boot_Unicode__Normalize( CV* cv __attribute__((unused))); /* prototype to pass -Wmissing-prototypes */
1290XS_EXTERNAL(boot_Unicode__Normalize)void boot_Unicode__Normalize( CV* cv __attribute__((unused)))
1291{
1292#if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5))
1293 dVARstruct Perl___notused_struct; dXSARGSSV **sp = PL_stack_sp; I32 ax = Perl_POPMARK(); SV **mark = PL_stack_base
+ ax++; I32 items = (I32)(sp - mark)
;
1294#else
1295 dVARstruct Perl___notused_struct; dXSBOOTARGSXSAPIVERCHKI32 ax = Perl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter
)) << 16) | ((sizeof("" "1.27" "")-1) > 0xFF ? (Perl_croak
("panic: handshake overflow"), 0xFF) : (sizeof("" "1.27" "")-
1) << 8) | ((((1)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 :
0) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | ((((
1)) ? (_Bool)1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" "v"
"5" "." "32" "." "0" "")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow"
), 0x0000001F) : (sizeof("" "v" "5" "." "32" "." "0" "")-1)))
, cv, "Normalize.c", "v" "5" "." "32" "." "0", "1.27"); SV **
mark = PL_stack_base + ax; SV **sp = PL_stack_sp; I32 items =
(I32)(sp - mark)
;
1296#endif
1297#if (PERL_REVISION5 == 5 && PERL_VERSION32 < 9)
1298 char* file = __FILE__"Normalize.c";
1299#else
1300 const char* file = __FILE__"Normalize.c";
1301#endif
1302
1303 PERL_UNUSED_VAR(file)((void)sizeof(file));
1304
1305 PERL_UNUSED_VAR(cv)((void)sizeof(cv)); /* -W */
1306 PERL_UNUSED_VAR(items)((void)sizeof(items)); /* -W */
1307#if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5))
1308 XS_VERSION_BOOTCHECKPerl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter))
<< 16) | ((sizeof("" "1.27" "")-1) > 0xFF ? (Perl_croak
("panic: handshake overflow"), 0xFF) : (sizeof("" "1.27" "")-
1) << 8) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 :
0) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | ((((
0)) ? (_Bool)1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" ""
"")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow"
), 0x0000001F) : (sizeof("" "" "")-1))), cv, "Normalize.c", items
, ax, "1.27")
;
1309# ifdef XS_APIVERSION_BOOTCHECKPerl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter))
<< 16) | ((sizeof("" "" "")-1) > 0xFF ? (Perl_croak
("panic: handshake overflow"), 0xFF) : (sizeof("" "" "")-1) <<
8) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 : 0) | ((((
0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | ((((0)) ? (_Bool
)1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" "v" "5" "." "32"
"." "0" "")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow"
), 0x0000001F) : (sizeof("" "v" "5" "." "32" "." "0" "")-1)))
, cv, "Normalize.c", items, ax, "v" "5" "." "32" "." "0")
1310 XS_APIVERSION_BOOTCHECKPerl_xs_handshake((((sizeof(struct PerlHandShakeInterpreter))
<< 16) | ((sizeof("" "" "")-1) > 0xFF ? (Perl_croak
("panic: handshake overflow"), 0xFF) : (sizeof("" "" "")-1) <<
8) | ((((0)) ? (_Bool)1 : (_Bool)0) ? 0x00000020 : 0) | ((((
0)) ? (_Bool)1 : (_Bool)0) ? 0x00000080 : 0) | ((((0)) ? (_Bool
)1 : (_Bool)0) ? 0x00000040 : 0) | ((sizeof("" "v" "5" "." "32"
"." "0" "")-1) > 0x0000001F ? (Perl_croak("panic: handshake overflow"
), 0x0000001F) : (sizeof("" "v" "5" "." "32" "." "0" "")-1)))
, cv, "Normalize.c", items, ax, "v" "5" "." "32" "." "0")
;
1311# endif
1312#endif
1313
1314 (void)newXSproto_portable("Unicode::Normalize::decompose", XS_Unicode__Normalize_decompose, file, "$;$")Perl_newXS_flags( "Unicode::Normalize::decompose",XS_Unicode__Normalize_decompose
,file,"$;$",0)
;
1315 (void)newXSproto_portable("Unicode::Normalize::reorder", XS_Unicode__Normalize_reorder, file, "$")Perl_newXS_flags( "Unicode::Normalize::reorder",XS_Unicode__Normalize_reorder
,file,"$",0)
;
1316 cv = newXSproto_portable("Unicode::Normalize::compose", XS_Unicode__Normalize_compose, file, "$")Perl_newXS_flags( "Unicode::Normalize::compose",XS_Unicode__Normalize_compose
,file,"$",0)
;
1317 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1318 cv = newXSproto_portable("Unicode::Normalize::composeContiguous", XS_Unicode__Normalize_compose, file, "$")Perl_newXS_flags( "Unicode::Normalize::composeContiguous",XS_Unicode__Normalize_compose
,file,"$",0)
;
1319 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1320 cv = newXSproto_portable("Unicode::Normalize::NFD", XS_Unicode__Normalize_NFD, file, "$")Perl_newXS_flags( "Unicode::Normalize::NFD",XS_Unicode__Normalize_NFD
,file,"$",0)
;
1321 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1322 cv = newXSproto_portable("Unicode::Normalize::NFKD", XS_Unicode__Normalize_NFD, file, "$")Perl_newXS_flags( "Unicode::Normalize::NFKD",XS_Unicode__Normalize_NFD
,file,"$",0)
;
1323 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1324 cv = newXSproto_portable("Unicode::Normalize::FCC", XS_Unicode__Normalize_NFC, file, "$")Perl_newXS_flags( "Unicode::Normalize::FCC",XS_Unicode__Normalize_NFC
,file,"$",0)
;
1325 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 2;
1326 cv = newXSproto_portable("Unicode::Normalize::NFC", XS_Unicode__Normalize_NFC, file, "$")Perl_newXS_flags( "Unicode::Normalize::NFC",XS_Unicode__Normalize_NFC
,file,"$",0)
;
1327 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1328 cv = newXSproto_portable("Unicode::Normalize::NFKC", XS_Unicode__Normalize_NFC, file, "$")Perl_newXS_flags( "Unicode::Normalize::NFKC",XS_Unicode__Normalize_NFC
,file,"$",0)
;
1329 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1330 cv = newXSproto_portable("Unicode::Normalize::checkNFD", XS_Unicode__Normalize_checkNFD, file, "$")Perl_newXS_flags( "Unicode::Normalize::checkNFD",XS_Unicode__Normalize_checkNFD
,file,"$",0)
;
1331 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1332 cv = newXSproto_portable("Unicode::Normalize::checkNFKD", XS_Unicode__Normalize_checkNFD, file, "$")Perl_newXS_flags( "Unicode::Normalize::checkNFKD",XS_Unicode__Normalize_checkNFD
,file,"$",0)
;
1333 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1334 cv = newXSproto_portable("Unicode::Normalize::checkNFC", XS_Unicode__Normalize_checkNFC, file, "$")Perl_newXS_flags( "Unicode::Normalize::checkNFC",XS_Unicode__Normalize_checkNFC
,file,"$",0)
;
1335 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1336 cv = newXSproto_portable("Unicode::Normalize::checkNFKC", XS_Unicode__Normalize_checkNFC, file, "$")Perl_newXS_flags( "Unicode::Normalize::checkNFKC",XS_Unicode__Normalize_checkNFC
,file,"$",0)
;
1337 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1338 cv = newXSproto_portable("Unicode::Normalize::checkFCC", XS_Unicode__Normalize_checkFCD, file, "$")Perl_newXS_flags( "Unicode::Normalize::checkFCC",XS_Unicode__Normalize_checkFCD
,file,"$",0)
;
1339 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1340 cv = newXSproto_portable("Unicode::Normalize::checkFCD", XS_Unicode__Normalize_checkFCD, file, "$")Perl_newXS_flags( "Unicode::Normalize::checkFCD",XS_Unicode__Normalize_checkFCD
,file,"$",0)
;
1341 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1342 (void)newXSproto_portable("Unicode::Normalize::getCombinClass", XS_Unicode__Normalize_getCombinClass, file, "$")Perl_newXS_flags( "Unicode::Normalize::getCombinClass",XS_Unicode__Normalize_getCombinClass
,file,"$",0)
;
1343 (void)newXSproto_portable("Unicode::Normalize::isExclusion", XS_Unicode__Normalize_isExclusion, file, "$")Perl_newXS_flags( "Unicode::Normalize::isExclusion",XS_Unicode__Normalize_isExclusion
,file,"$",0)
;
1344 (void)newXSproto_portable("Unicode::Normalize::isSingleton", XS_Unicode__Normalize_isSingleton, file, "$")Perl_newXS_flags( "Unicode::Normalize::isSingleton",XS_Unicode__Normalize_isSingleton
,file,"$",0)
;
1345 (void)newXSproto_portable("Unicode::Normalize::isNonStDecomp", XS_Unicode__Normalize_isNonStDecomp, file, "$")Perl_newXS_flags( "Unicode::Normalize::isNonStDecomp",XS_Unicode__Normalize_isNonStDecomp
,file,"$",0)
;
1346 cv = newXSproto_portable("Unicode::Normalize::isComp2nd", XS_Unicode__Normalize_isComp2nd, file, "$")Perl_newXS_flags( "Unicode::Normalize::isComp2nd",XS_Unicode__Normalize_isComp2nd
,file,"$",0)
;
1347 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1348 cv = newXSproto_portable("Unicode::Normalize::isNFC_MAYBE", XS_Unicode__Normalize_isComp2nd, file, "$")Perl_newXS_flags( "Unicode::Normalize::isNFC_MAYBE",XS_Unicode__Normalize_isComp2nd
,file,"$",0)
;
1349 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1350 cv = newXSproto_portable("Unicode::Normalize::isNFKC_MAYBE", XS_Unicode__Normalize_isComp2nd, file, "$")Perl_newXS_flags( "Unicode::Normalize::isNFKC_MAYBE",XS_Unicode__Normalize_isComp2nd
,file,"$",0)
;
1351 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 2;
1352 cv = newXSproto_portable("Unicode::Normalize::isNFD_NO", XS_Unicode__Normalize_isNFD_NO, file, "$")Perl_newXS_flags( "Unicode::Normalize::isNFD_NO",XS_Unicode__Normalize_isNFD_NO
,file,"$",0)
;
1353 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1354 cv = newXSproto_portable("Unicode::Normalize::isNFKD_NO", XS_Unicode__Normalize_isNFD_NO, file, "$")Perl_newXS_flags( "Unicode::Normalize::isNFKD_NO",XS_Unicode__Normalize_isNFD_NO
,file,"$",0)
;
1355 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1356 cv = newXSproto_portable("Unicode::Normalize::isComp_Ex", XS_Unicode__Normalize_isComp_Ex, file, "$")Perl_newXS_flags( "Unicode::Normalize::isComp_Ex",XS_Unicode__Normalize_isComp_Ex
,file,"$",0)
;
1357 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1358 cv = newXSproto_portable("Unicode::Normalize::isNFC_NO", XS_Unicode__Normalize_isComp_Ex, file, "$")Perl_newXS_flags( "Unicode::Normalize::isNFC_NO",XS_Unicode__Normalize_isComp_Ex
,file,"$",0)
;
1359 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1360 cv = newXSproto_portable("Unicode::Normalize::isNFKC_NO", XS_Unicode__Normalize_isComp_Ex, file, "$")Perl_newXS_flags( "Unicode::Normalize::isNFKC_NO",XS_Unicode__Normalize_isComp_Ex
,file,"$",0)
;
1361 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1362 (void)newXSproto_portable("Unicode::Normalize::getComposite", XS_Unicode__Normalize_getComposite, file, "$$")Perl_newXS_flags( "Unicode::Normalize::getComposite",XS_Unicode__Normalize_getComposite
,file,"$$",0)
;
1363 cv = newXSproto_portable("Unicode::Normalize::getCanon", XS_Unicode__Normalize_getCanon, file, "$")Perl_newXS_flags( "Unicode::Normalize::getCanon",XS_Unicode__Normalize_getCanon
,file,"$",0)
;
1364 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 0;
1365 cv = newXSproto_portable("Unicode::Normalize::getCompat", XS_Unicode__Normalize_getCanon, file, "$")Perl_newXS_flags( "Unicode::Normalize::getCompat",XS_Unicode__Normalize_getCanon
,file,"$",0)
;
1366 XSANY((XPVCV*)({ void *_p = ((cv)->sv_any); _p; }))->xcv_start_u
.xcv_xsubany
.any_i32 = 1;
1367 newXS_deffile("Unicode::Normalize::splitOnLastStarter", XS_Unicode__Normalize_splitOnLastStarter)Perl_newXS_deffile( "Unicode::Normalize::splitOnLastStarter",
XS_Unicode__Normalize_splitOnLastStarter)
;
1368#if PERL_VERSION_LE(5, 21, 5)((5*1000000 + 32*1000 + 1) <= (5*1000000 + 21*1000 + 5))
1369# if PERL_VERSION_GE(5, 9, 0)((5*1000000 + 32*1000 + 1) >= (5*1000000 + 9*1000 + 0))
1370 if (PL_unitcheckav)
1371 call_list(PL_scopestack_ix, PL_unitcheckav)Perl_call_list( PL_scopestack_ix,PL_unitcheckav);
1372# endif
1373 XSRETURN_YESdo { (PL_stack_base[ax + (0)] = &(PL_sv_immortals[0]) ); do
{ const IV tmpXSoff = (1); ((void)0); PL_stack_sp = PL_stack_base
+ ax + (tmpXSoff - 1); return; } while (0); } while (0)
;
1374#else
1375 Perl_xs_boot_epilog(aTHX_ ax);
1376#endif
1377}
1378