| 1 |
|
| /* |
| 2 |
|
| * This file was generated automatically by XS::Install::FrozenShit::ParseXS version 3.57 from the |
| 3 |
|
| * contents of Recursive.xs. Do not edit this file, edit Recursive.xs instead. |
| 4 |
|
| * |
| 5 |
|
| * ANY CHANGES MADE HERE WILL BE LOST! |
| 6 |
|
| * |
| 7 |
|
| */ |
| 8 |
|
| |
| 9 |
|
| #line 1 "Recursive.xs" |
| 10 |
|
| #include <xs.h> |
| 11 |
|
| #include <xs/clone.h> |
| 12 |
|
| #include <xs/merge.h> |
| 13 |
|
| #include <xs/export.h> |
| 14 |
|
| #include <xs/compare.h> |
| 15 |
|
| |
| 16 |
|
| using namespace xs; |
| 17 |
|
| |
| 18 |
|
| #line 19 "Recursive_xsgen.cc" |
| 19 |
|
| #ifndef PERL_UNUSED_VAR |
| 20 |
|
| # define PERL_UNUSED_VAR(var) if (0) var = var |
| 21 |
|
| #endif |
| 22 |
|
| |
| 23 |
|
| #ifndef dVAR |
| 24 |
|
| # define dVAR dNOOP |
| 25 |
|
| #endif |
| 26 |
|
| |
| 27 |
|
| |
| 28 |
|
| /* This stuff is not part of the API! You have been warned. */ |
| 29 |
|
| #ifndef PERL_VERSION_DECIMAL |
| 30 |
|
| # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
| 31 |
|
| #endif |
| 32 |
|
| #ifndef PERL_DECIMAL_VERSION |
| 33 |
|
| # define PERL_DECIMAL_VERSION \ |
| 34 |
|
| PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
| 35 |
|
| #endif |
| 36 |
|
| #ifndef PERL_VERSION_GE |
| 37 |
|
| # define PERL_VERSION_GE(r,v,s) \ |
| 38 |
|
| (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
| 39 |
|
| #endif |
| 40 |
|
| #ifndef PERL_VERSION_LE |
| 41 |
|
| # define PERL_VERSION_LE(r,v,s) \ |
| 42 |
|
| (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
| 43 |
|
| #endif |
| 44 |
|
| |
| 45 |
|
| /* XS_INTERNAL is the explicit static-linkage variant of the default |
| 46 |
|
| * XS macro. |
| 47 |
|
| * |
| 48 |
|
| * XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
| 49 |
|
| * "STATIC", ie. it exports XSUB symbols. You probably don't want that |
| 50 |
|
| * for anything but the BOOT XSUB. |
| 51 |
|
| * |
| 52 |
|
| * See XSUB.h in core! |
| 53 |
|
| */ |
| 54 |
|
| |
| 55 |
|
| |
| 56 |
|
| /* TODO: This might be compatible further back than 5.10.0. */ |
| 57 |
|
| #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
| 58 |
|
| # undef XS_EXTERNAL |
| 59 |
|
| # undef XS_INTERNAL |
| 60 |
|
| # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
| 61 |
|
| # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
| 62 |
|
| # define XS_INTERNAL(name) STATIC XSPROTO(name) |
| 63 |
|
| # endif |
| 64 |
|
| # if defined(__SYMBIAN32__) |
| 65 |
|
| # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
| 66 |
|
| # define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
| 67 |
|
| # endif |
| 68 |
|
| # ifndef XS_EXTERNAL |
| 69 |
|
| # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
| 70 |
|
| # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
| 71 |
|
| # define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
| 72 |
|
| # else |
| 73 |
|
| # ifdef __cplusplus |
| 74 |
|
| # define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
| 75 |
|
| # define XS_INTERNAL(name) static XSPROTO(name) |
| 76 |
|
| # else |
| 77 |
|
| # define XS_EXTERNAL(name) XSPROTO(name) |
| 78 |
|
| # define XS_INTERNAL(name) STATIC XSPROTO(name) |
| 79 |
|
| # endif |
| 80 |
|
| # endif |
| 81 |
|
| # endif |
| 82 |
|
| #endif |
| 83 |
|
| |
| 84 |
|
| /* perl >= 5.10.0 && perl <= 5.15.1 */ |
| 85 |
|
| |
| 86 |
|
| |
| 87 |
|
| /* The XS_EXTERNAL macro is used for functions that must not be static |
| 88 |
|
| * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
| 89 |
|
| * macro defined, the best we can do is assume XS is the same. |
| 90 |
|
| * Dito for XS_INTERNAL. |
| 91 |
|
| */ |
| 92 |
|
| #ifndef XS_EXTERNAL |
| 93 |
|
| # define XS_EXTERNAL(name) XS(name) |
| 94 |
|
| #endif |
| 95 |
|
| #ifndef XS_INTERNAL |
| 96 |
|
| # define XS_INTERNAL(name) XS(name) |
| 97 |
|
| #endif |
| 98 |
|
| |
| 99 |
|
| /* Now, finally, after all this mess, we want an XS::Install::FrozenShit::ParseXS |
| 100 |
|
| * internal macro that we're free to redefine for varying linkage due |
| 101 |
|
| * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
| 102 |
|
| * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
| 103 |
|
| */ |
| 104 |
|
| |
| 105 |
|
| #undef XS_EUPXS |
| 106 |
|
| #if defined(PERL_EUPXS_ALWAYS_EXPORT) |
| 107 |
|
| # define XS_EUPXS(name) XS_EXTERNAL(name) |
| 108 |
|
| #else |
| 109 |
|
| /* default to internal */ |
| 110 |
|
| # define XS_EUPXS(name) XS_INTERNAL(name) |
| 111 |
|
| #endif |
| 112 |
|
| |
| 113 |
|
| #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
| 114 |
|
| #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
| 115 |
|
| |
| 116 |
|
| /* prototype to pass -Wmissing-prototypes */ |
| 117 |
|
| STATIC void |
| 118 |
|
| S_croak_xs_usage(const CV *const cv, const char *const params); |
| 119 |
|
| |
| 120 |
|
| STATIC void |
| 121 |
|
| S_croak_xs_usage(const CV *const cv, const char *const params) |
| 122 |
|
| { |
| 123 |
|
| const GV *const gv = CvGV(cv); |
| 124 |
|
| |
| 125 |
|
| PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
| 126 |
|
| |
| 127 |
|
| if (gv) { |
| 128 |
|
| const char *const gvname = GvNAME(gv); |
| 129 |
|
| const HV *const stash = GvSTASH(gv); |
| 130 |
|
| const char *const hvname = stash ? HvNAME(stash) : NULL; |
| 131 |
|
| |
| 132 |
|
| if (hvname) |
| 133 |
|
| Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
| 134 |
|
| else |
| 135 |
|
| Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
| 136 |
|
| } else { |
| 137 |
|
| /* Pants. I don't think that it should be possible to get here. */ |
| 138 |
|
| Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
| 139 |
|
| } |
| 140 |
|
| } |
| 141 |
|
| #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
| 142 |
|
| |
| 143 |
|
| #define croak_xs_usage S_croak_xs_usage |
| 144 |
|
| |
| 145 |
|
| #endif |
| 146 |
|
| |
| 147 |
|
| /* NOTE: the prototype of newXSproto() is different in versions of perls, |
| 148 |
|
| * so we define a portable version of newXSproto() |
| 149 |
|
| */ |
| 150 |
|
| #ifdef newXS_flags |
| 151 |
|
| #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
| 152 |
|
| #else |
| 153 |
|
| #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
| 154 |
|
| #endif /* !defined(newXS_flags) */ |
| 155 |
|
| |
| 156 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 157 |
|
| # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
| 158 |
|
| #else |
| 159 |
|
| # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
| 160 |
|
| #endif |
| 161 |
|
| |
| 162 |
|
| /* simple backcompat versions of the TARGx() macros with no optimisation */ |
| 163 |
|
| #ifndef TARGi |
| 164 |
|
| # define TARGi(iv, do_taint) sv_setiv_mg(TARG, iv) |
| 165 |
|
| # define TARGu(uv, do_taint) sv_setuv_mg(TARG, uv) |
| 166 |
|
| # define TARGn(nv, do_taint) sv_setnv_mg(TARG, nv) |
| 167 |
|
| #endif |
| 168 |
|
| |
| 169 |
|
| #line 170 "Recursive_xsgen.cc" |
| 170 |
|
| |
| 171 |
|
| |
| 172 |
40 |
▶ | XS_EUPXS(XS_Data__Recursive_lclone) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Data__Recursive_lclone) { xs::throw_guard(cv, [=]() |
19 |
0 |
19 |
|
| 173 |
|
| { |
| 174 |
20 |
| dVAR; dXSARGS; |
| 175 |
20 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
20 |
20 |
|
| 176 |
0 |
| croak_xs_usage(cv, "source"); |
| 177 |
|
| { |
| 178 |
20 |
| Scalar RETVAL; |
| 179 |
20 |
| SV* source = ST(0) |
| 180 |
|
| ; |
| 181 |
|
| #line 28 "Recursive.xs" |
| 182 |
|
| RETVAL = clone(source, 0); |
| 183 |
|
| #line 184 "Recursive_xsgen.cc" |
| 184 |
|
| { |
| 185 |
|
| SV * RETVALSV; |
| 186 |
19 |
| RETVALSV = NULL; |
| 187 |
19 |
▶ | if (!RETVAL) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!RETVAL) XSRETURN_UNDEF; |
0 |
19 |
19 |
|
| 188 |
19 |
| RETVALSV = RETVAL.detach(); |
| 189 |
19 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
19 |
0 |
19 |
|
| 190 |
19 |
| ST(0) = RETVALSV; |
| 191 |
|
| } |
| 192 |
20 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
19 |
0 |
19 |
|
| 193 |
19 |
| XSRETURN(1); |
| 194 |
19 |
| }); } |
| 195 |
|
| |
| 196 |
|
| |
| 197 |
|
| |
| 198 |
22 |
▶ | XS_EUPXS(XS_Data__Recursive_clone) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Data__Recursive_clone) { xs::throw_guard(cv, [=]() |
10 |
0 |
10 |
|
| 199 |
|
| { |
| 200 |
11 |
| dVAR; dXSARGS; |
| 201 |
11 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
11 |
0 |
11 |
| if (items < 1 || items > 2) |
0 |
11 |
11 |
|
| 202 |
0 |
| croak_xs_usage(cv, "source, flags= CloneFlags::TRACK_REFS"); |
| 203 |
|
| { |
| 204 |
11 |
| Scalar RETVAL; |
| 205 |
11 |
| SV* source = ST(0) |
| 206 |
|
| ; |
| 207 |
|
| int flags; |
| 208 |
|
| |
| 209 |
11 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
9 |
2 |
11 |
|
| 210 |
9 |
| flags = CloneFlags::TRACK_REFS; |
| 211 |
|
| else { |
| 212 |
2 |
▶ | flags = (int)SvIV(ST(1)) |
Branch: 1 branch
| Branch | True | False | Total |
| flags = (int)SvIV(ST(1)) |
2 |
0 |
2 |
|
| 213 |
|
| ; |
| 214 |
|
| } |
| 215 |
|
| #line 32 "Recursive.xs" |
| 216 |
|
| RETVAL = clone(source, flags); |
| 217 |
|
| #line 218 "Recursive_xsgen.cc" |
| 218 |
|
| { |
| 219 |
|
| SV * RETVALSV; |
| 220 |
10 |
| RETVALSV = NULL; |
| 221 |
10 |
▶ | if (!RETVAL) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!RETVAL) XSRETURN_UNDEF; |
0 |
10 |
10 |
|
| 222 |
10 |
| RETVALSV = RETVAL.detach(); |
| 223 |
10 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
10 |
0 |
10 |
|
| 224 |
10 |
| ST(0) = RETVALSV; |
| 225 |
|
| } |
| 226 |
11 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
10 |
0 |
10 |
|
| 227 |
10 |
| XSRETURN(1); |
| 228 |
10 |
| }); } |
| 229 |
|
| |
| 230 |
|
| |
| 231 |
|
| |
| 232 |
16 |
▶ | XS_EUPXS(XS_Data__Recursive_merge) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Data__Recursive_merge) { xs::throw_guard(cv, [=]() |
8 |
0 |
8 |
|
| 233 |
|
| { |
| 234 |
8 |
| dVAR; dXSARGS; |
| 235 |
8 |
▶ | if (items < 2 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 2 || items > 3) |
8 |
0 |
8 |
| if (items < 2 || items > 3) |
0 |
8 |
8 |
|
| 236 |
0 |
| croak_xs_usage(cv, "dest, source, flags= 0"); |
| 237 |
|
| { |
| 238 |
8 |
| Scalar RETVAL; |
| 239 |
8 |
| SV* dest = ST(0) |
| 240 |
|
| ; |
| 241 |
8 |
| SV* source = ST(1) |
| 242 |
|
| ; |
| 243 |
|
| int flags; |
| 244 |
|
| |
| 245 |
8 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
4 |
4 |
8 |
|
| 246 |
4 |
| flags = 0; |
| 247 |
|
| else { |
| 248 |
4 |
▶ | flags = (int)SvIV(ST(2)) |
Branch: 1 branch
| Branch | True | False | Total |
| flags = (int)SvIV(ST(2)) |
4 |
0 |
4 |
|
| 249 |
|
| ; |
| 250 |
|
| } |
| 251 |
|
| #line 36 "Recursive.xs" |
| 252 |
|
| RETVAL = merge(Sv(dest), Sv(source), flags); |
| 253 |
|
| #line 254 "Recursive_xsgen.cc" |
| 254 |
|
| { |
| 255 |
|
| SV * RETVALSV; |
| 256 |
8 |
| RETVALSV = NULL; |
| 257 |
8 |
▶ | if (!RETVAL) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!RETVAL) XSRETURN_UNDEF; |
0 |
8 |
8 |
|
| 258 |
8 |
| RETVALSV = RETVAL.detach(); |
| 259 |
8 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
8 |
0 |
8 |
|
| 260 |
8 |
| ST(0) = RETVALSV; |
| 261 |
|
| } |
| 262 |
8 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
8 |
0 |
8 |
|
| 263 |
8 |
| XSRETURN(1); |
| 264 |
8 |
| }); } |
| 265 |
|
| |
| 266 |
|
| |
| 267 |
|
| |
| 268 |
40 |
▶ | XS_EUPXS(XS_Data__Recursive_hash_merge) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Data__Recursive_hash_merge) { xs::throw_guard(cv, [=]() |
19 |
0 |
19 |
|
| 269 |
|
| { |
| 270 |
20 |
| dVAR; dXSARGS; |
| 271 |
20 |
▶ | if (items < 2 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 2 || items > 3) |
20 |
0 |
20 |
| if (items < 2 || items > 3) |
0 |
20 |
20 |
|
| 272 |
0 |
| croak_xs_usage(cv, "dest, source, flags= 0"); |
| 273 |
|
| { |
| 274 |
20 |
| Scalar RETVAL; |
| 275 |
20 |
▶ | Hash dest = ST(0); |
Branch: 1 branch
| Branch | True | False | Total |
| Hash dest = ST(0); |
20 |
0 |
20 |
|
| 276 |
20 |
▶ | if (!dest && SvOK(ST(0))) throw "arg is not a 'Hash' reference" |
Branch: 3 branches
| Branch | True | False | Total |
| if (!dest && SvOK(ST(0))) throw "arg is not a 'Hash' reference" |
2 |
18 |
20 |
| if (!dest && SvOK(ST(0))) throw "arg is not a 'Hash' reference" |
0 |
2 |
2 |
| if (!dest && SvOK(ST(0))) throw "arg is not a 'Hash' reference" |
0 |
20 |
20 |
|
| 277 |
|
| ; |
| 278 |
20 |
▶ | Hash source = ST(1); |
Branch: 1 branch
| Branch | True | False | Total |
| Hash source = ST(1); |
20 |
0 |
20 |
|
| 279 |
20 |
▶ | if (!source && SvOK(ST(1))) throw "arg is not a 'Hash' reference" |
Branch: 3 branches
| Branch | True | False | Total |
| if (!source && SvOK(ST(1))) throw "arg is not a 'Hash' reference" |
3 |
17 |
20 |
| if (!source && SvOK(ST(1))) throw "arg is not a 'Hash' reference" |
0 |
3 |
3 |
| if (!source && SvOK(ST(1))) throw "arg is not a 'Hash' reference" |
0 |
20 |
20 |
|
| 280 |
|
| ; |
| 281 |
|
| int flags; |
| 282 |
|
| |
| 283 |
20 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
10 |
10 |
20 |
|
| 284 |
10 |
| flags = 0; |
| 285 |
|
| else { |
| 286 |
10 |
▶ | flags = (int)SvIV(ST(2)) |
Branch: 1 branch
| Branch | True | False | Total |
| flags = (int)SvIV(ST(2)) |
10 |
0 |
10 |
|
| 287 |
|
| ; |
| 288 |
|
| } |
| 289 |
|
| #line 40 "Recursive.xs" |
| 290 |
|
| auto result = merge(dest, source, flags); |
| 291 |
|
| if (result == dest) RETVAL = ST(0); // hash not changed - return the same Ref for speed |
| 292 |
|
| else RETVAL = Ref::create(result); |
| 293 |
|
| #line 294 "Recursive_xsgen.cc" |
| 294 |
|
| { |
| 295 |
|
| SV * RETVALSV; |
| 296 |
19 |
| RETVALSV = NULL; |
| 297 |
19 |
▶ | if (!RETVAL) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!RETVAL) XSRETURN_UNDEF; |
0 |
19 |
19 |
|
| 298 |
19 |
| RETVALSV = RETVAL.detach(); |
| 299 |
19 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
19 |
0 |
19 |
|
| 300 |
19 |
| ST(0) = RETVALSV; |
| 301 |
|
| } |
| 302 |
22 |
▶ | } |
Branch: 4 branches
| Branch | True | False | Total |
| } |
19 |
0 |
19 |
| } |
19 |
0 |
19 |
| } |
19 |
0 |
19 |
| } |
19 |
0 |
19 |
|
| 303 |
19 |
| XSRETURN(1); |
| 304 |
19 |
| }); } |
| 305 |
|
| |
| 306 |
|
| |
| 307 |
|
| |
| 308 |
0 |
▶ | XS_EUPXS(XS_Data__Recursive_array_merge) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Data__Recursive_array_merge) { xs::throw_guard(cv, [=]() |
0 |
0 |
0 |
|
| 309 |
|
| { |
| 310 |
0 |
| dVAR; dXSARGS; |
| 311 |
0 |
▶ | if (items < 2 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 2 || items > 3) |
0 |
0 |
0 |
| if (items < 2 || items > 3) |
0 |
0 |
0 |
|
| 312 |
0 |
| croak_xs_usage(cv, "dest, source, flags= 0"); |
| 313 |
|
| { |
| 314 |
0 |
| Scalar RETVAL; |
| 315 |
0 |
▶ | Array dest = ST(0); |
Branch: 1 branch
| Branch | True | False | Total |
| Array dest = ST(0); |
0 |
0 |
0 |
|
| 316 |
0 |
▶ | if (!dest && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
Branch: 3 branches
| Branch | True | False | Total |
| if (!dest && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
0 |
0 |
0 |
| if (!dest && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
0 |
0 |
0 |
| if (!dest && SvOK(ST(0))) throw "arg is not a 'Array' reference" |
0 |
0 |
0 |
|
| 317 |
|
| ; |
| 318 |
0 |
▶ | Array source = ST(1); |
Branch: 1 branch
| Branch | True | False | Total |
| Array source = ST(1); |
0 |
0 |
0 |
|
| 319 |
0 |
▶ | if (!source && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
Branch: 3 branches
| Branch | True | False | Total |
| if (!source && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
0 |
0 |
0 |
| if (!source && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
0 |
0 |
0 |
| if (!source && SvOK(ST(1))) throw "arg is not a 'Array' reference" |
0 |
0 |
0 |
|
| 320 |
|
| ; |
| 321 |
|
| int flags; |
| 322 |
|
| |
| 323 |
0 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
0 |
0 |
0 |
|
| 324 |
0 |
| flags = 0; |
| 325 |
|
| else { |
| 326 |
0 |
▶ | flags = (int)SvIV(ST(2)) |
Branch: 1 branch
| Branch | True | False | Total |
| flags = (int)SvIV(ST(2)) |
0 |
0 |
0 |
|
| 327 |
|
| ; |
| 328 |
|
| } |
| 329 |
|
| #line 46 "Recursive.xs" |
| 330 |
|
| auto result = merge(dest, source, flags); |
| 331 |
|
| if (result == dest) RETVAL = ST(0); // array not changed - return the same Ref for speed |
| 332 |
|
| else RETVAL = Ref::create(result); |
| 333 |
|
| #line 334 "Recursive_xsgen.cc" |
| 334 |
|
| { |
| 335 |
|
| SV * RETVALSV; |
| 336 |
0 |
| RETVALSV = NULL; |
| 337 |
0 |
▶ | if (!RETVAL) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!RETVAL) XSRETURN_UNDEF; |
0 |
0 |
0 |
|
| 338 |
0 |
| RETVALSV = RETVAL.detach(); |
| 339 |
0 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
0 |
0 |
0 |
|
| 340 |
0 |
| ST(0) = RETVALSV; |
| 341 |
|
| } |
| 342 |
0 |
▶ | } |
Branch: 4 branches
| Branch | True | False | Total |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
|
| 343 |
0 |
| XSRETURN(1); |
| 344 |
0 |
| }); } |
| 345 |
|
| |
| 346 |
|
| |
| 347 |
|
| |
| 348 |
114 |
▶ | XS_EUPXS(XS_Data__Recursive_compare) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Data__Recursive_compare) { xs::throw_guard(cv, [=]() |
57 |
0 |
57 |
|
| 349 |
|
| { |
| 350 |
57 |
| dVAR; dXSARGS; |
| 351 |
57 |
▶ | if (items != 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 2) |
0 |
57 |
57 |
|
| 352 |
0 |
| croak_xs_usage(cv, "first, second"); |
| 353 |
|
| { |
| 354 |
|
| bool RETVAL; |
| 355 |
57 |
| Sv first = ST(0) |
| 356 |
|
| ; |
| 357 |
57 |
| Sv second = ST(1) |
| 358 |
|
| ; |
| 359 |
|
| #line 51 "Recursive.xs" |
| 360 |
|
| RETVAL = compare(first, second); |
| 361 |
|
| #line 362 "Recursive_xsgen.cc" |
| 362 |
57 |
▶ | ST(0) = boolSV(RETVAL); |
Branch: 1 branch
| Branch | True | False | Total |
| ST(0) = boolSV(RETVAL); |
29 |
28 |
57 |
|
| 363 |
57 |
| } |
| 364 |
57 |
| XSRETURN(1); |
| 365 |
57 |
| }); } |
| 366 |
|
| |
| 367 |
|
| #ifdef __cplusplus |
| 368 |
|
| extern "C" { |
| 369 |
|
| #endif |
| 370 |
|
| |
| 371 |
14 |
▶ | XS_EXTERNAL(boot_Data__Recursive) { xs::throw_guard(cv, [=]() mutable |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EXTERNAL(boot_Data__Recursive) { xs::throw_guard(cv, [=]() mutable |
7 |
0 |
7 |
|
| 372 |
|
| { |
| 373 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 374 |
|
| dVAR; dXSARGS; |
| 375 |
|
| #else |
| 376 |
7 |
| dVAR; dXSBOOTARGSXSAPIVERCHK; |
| 377 |
|
| #endif |
| 378 |
|
| #if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ |
| 379 |
|
| char* file = __FILE__; |
| 380 |
|
| #else |
| 381 |
7 |
| const char* file = __FILE__; |
| 382 |
|
| #endif |
| 383 |
|
| |
| 384 |
|
| PERL_UNUSED_VAR(file); |
| 385 |
|
| |
| 386 |
|
| PERL_UNUSED_VAR(cv); /* -W */ |
| 387 |
|
| PERL_UNUSED_VAR(items); /* -W */ |
| 388 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 389 |
|
| XS_VERSION_BOOTCHECK; |
| 390 |
|
| # ifdef XS_APIVERSION_BOOTCHECK |
| 391 |
|
| XS_APIVERSION_BOOTCHECK; |
| 392 |
|
| # endif |
| 393 |
|
| #endif |
| 394 |
|
| |
| 395 |
7 |
| newXS_deffile("Data::Recursive::lclone", XS_Data__Recursive_lclone); |
| 396 |
7 |
| newXS_deffile("Data::Recursive::clone", XS_Data__Recursive_clone); |
| 397 |
7 |
| newXS_deffile("Data::Recursive::merge", XS_Data__Recursive_merge); |
| 398 |
7 |
| newXS_deffile("Data::Recursive::hash_merge", XS_Data__Recursive_hash_merge); |
| 399 |
7 |
| newXS_deffile("Data::Recursive::array_merge", XS_Data__Recursive_array_merge); |
| 400 |
7 |
| newXS_deffile("Data::Recursive::compare", XS_Data__Recursive_compare); |
| 401 |
|
| |
| 402 |
|
| /* Initialisation Section */ |
| 403 |
|
| |
| 404 |
|
| #line 12 "Recursive.xs" |
| 405 |
|
| { |
| 406 |
|
| Stash s("Data::Recursive"); |
| 407 |
|
| xs::exp::create_constants(s, { |
| 408 |
|
| {"TRACK_REFS", CloneFlags::TRACK_REFS}, |
| 409 |
|
| {"ARRAY_CONCAT", MergeFlags::ARRAY_CONCAT}, |
| 410 |
|
| {"ARRAY_MERGE", MergeFlags::ARRAY_MERGE}, |
| 411 |
|
| {"COPY_DEST", MergeFlags::COPY_DEST}, |
| 412 |
|
| {"LAZY", MergeFlags::LAZY}, |
| 413 |
|
| {"SKIP_UNDEF", MergeFlags::SKIP_UNDEF}, |
| 414 |
|
| {"DELETE_UNDEF", MergeFlags::DELETE_UNDEF}, |
| 415 |
|
| {"COPY_SOURCE", MergeFlags::COPY_SOURCE}, |
| 416 |
|
| {"COPY_ALL", MergeFlags::COPY_ALL} |
| 417 |
|
| }); |
| 418 |
|
| } |
| 419 |
|
| |
| 420 |
|
| #line 421 "Recursive_xsgen.cc" |
| 421 |
|
| |
| 422 |
|
| /* End of Initialisation Section */ |
| 423 |
|
| |
| 424 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 425 |
|
| # if PERL_VERSION_GE(5, 9, 0) |
| 426 |
|
| if (PL_unitcheckav) |
| 427 |
|
| call_list(PL_scopestack_ix, PL_unitcheckav); |
| 428 |
|
| # endif |
| 429 |
|
| XSRETURN_YES; |
| 430 |
|
| #else |
| 431 |
7 |
| Perl_xs_boot_epilog(aTHX_ ax); |
| 432 |
|
| #endif |
| 433 |
28 |
▶ | }); } |
Branch: 12 branches
| Branch | True | False | Total |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
7 |
0 |
7 |
| }); } |
0 |
0 |
0 |
| }); } |
0 |
0 |
0 |
|
| 434 |
|
| |
| 435 |
|
| #ifdef __cplusplus |
| 436 |
|
| } |
| 437 |
|
| #endif |