| 1 |
|
| /* |
| 2 |
|
| * This file was generated automatically by XS::Install::FrozenShit::ParseXS version 3.57 from the |
| 3 |
|
| * contents of main.xs. Do not edit this file, edit main.xs instead. |
| 4 |
|
| * |
| 5 |
|
| * ANY CHANGES MADE HERE WILL BE LOST! |
| 6 |
|
| * |
| 7 |
|
| */ |
| 8 |
|
| |
| 9 |
|
| #line 1 "xs/main.xs" |
| 10 |
|
| #include <xs/date.h> |
| 11 |
|
| #include <xs/export.h> |
| 12 |
|
| #include <panda/endian.h> |
| 13 |
|
| #include "private.h" |
| 14 |
|
| |
| 15 |
|
| using namespace xs; |
| 16 |
|
| using namespace xs::date; |
| 17 |
|
| using namespace panda::time; |
| 18 |
|
| using panda::string; |
| 19 |
|
| using panda::string_view; |
| 20 |
|
| |
| 21 |
|
| #line 22 "xs/main_xsgen.cc" |
| 22 |
|
| #ifndef PERL_UNUSED_VAR |
| 23 |
|
| # define PERL_UNUSED_VAR(var) if (0) var = var |
| 24 |
|
| #endif |
| 25 |
|
| |
| 26 |
|
| #ifndef dVAR |
| 27 |
|
| # define dVAR dNOOP |
| 28 |
|
| #endif |
| 29 |
|
| |
| 30 |
|
| |
| 31 |
|
| /* This stuff is not part of the API! You have been warned. */ |
| 32 |
|
| #ifndef PERL_VERSION_DECIMAL |
| 33 |
|
| # define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) |
| 34 |
|
| #endif |
| 35 |
|
| #ifndef PERL_DECIMAL_VERSION |
| 36 |
|
| # define PERL_DECIMAL_VERSION \ |
| 37 |
|
| PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) |
| 38 |
|
| #endif |
| 39 |
|
| #ifndef PERL_VERSION_GE |
| 40 |
|
| # define PERL_VERSION_GE(r,v,s) \ |
| 41 |
|
| (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) |
| 42 |
|
| #endif |
| 43 |
|
| #ifndef PERL_VERSION_LE |
| 44 |
|
| # define PERL_VERSION_LE(r,v,s) \ |
| 45 |
|
| (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s)) |
| 46 |
|
| #endif |
| 47 |
|
| |
| 48 |
|
| /* XS_INTERNAL is the explicit static-linkage variant of the default |
| 49 |
|
| * XS macro. |
| 50 |
|
| * |
| 51 |
|
| * XS_EXTERNAL is the same as XS_INTERNAL except it does not include |
| 52 |
|
| * "STATIC", ie. it exports XSUB symbols. You probably don't want that |
| 53 |
|
| * for anything but the BOOT XSUB. |
| 54 |
|
| * |
| 55 |
|
| * See XSUB.h in core! |
| 56 |
|
| */ |
| 57 |
|
| |
| 58 |
|
| |
| 59 |
|
| /* TODO: This might be compatible further back than 5.10.0. */ |
| 60 |
|
| #if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1) |
| 61 |
|
| # undef XS_EXTERNAL |
| 62 |
|
| # undef XS_INTERNAL |
| 63 |
|
| # if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING) |
| 64 |
|
| # define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name) |
| 65 |
|
| # define XS_INTERNAL(name) STATIC XSPROTO(name) |
| 66 |
|
| # endif |
| 67 |
|
| # if defined(__SYMBIAN32__) |
| 68 |
|
| # define XS_EXTERNAL(name) EXPORT_C XSPROTO(name) |
| 69 |
|
| # define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name) |
| 70 |
|
| # endif |
| 71 |
|
| # ifndef XS_EXTERNAL |
| 72 |
|
| # if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus) |
| 73 |
|
| # define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__) |
| 74 |
|
| # define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__) |
| 75 |
|
| # else |
| 76 |
|
| # ifdef __cplusplus |
| 77 |
|
| # define XS_EXTERNAL(name) extern "C" XSPROTO(name) |
| 78 |
|
| # define XS_INTERNAL(name) static XSPROTO(name) |
| 79 |
|
| # else |
| 80 |
|
| # define XS_EXTERNAL(name) XSPROTO(name) |
| 81 |
|
| # define XS_INTERNAL(name) STATIC XSPROTO(name) |
| 82 |
|
| # endif |
| 83 |
|
| # endif |
| 84 |
|
| # endif |
| 85 |
|
| #endif |
| 86 |
|
| |
| 87 |
|
| /* perl >= 5.10.0 && perl <= 5.15.1 */ |
| 88 |
|
| |
| 89 |
|
| |
| 90 |
|
| /* The XS_EXTERNAL macro is used for functions that must not be static |
| 91 |
|
| * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL |
| 92 |
|
| * macro defined, the best we can do is assume XS is the same. |
| 93 |
|
| * Dito for XS_INTERNAL. |
| 94 |
|
| */ |
| 95 |
|
| #ifndef XS_EXTERNAL |
| 96 |
|
| # define XS_EXTERNAL(name) XS(name) |
| 97 |
|
| #endif |
| 98 |
|
| #ifndef XS_INTERNAL |
| 99 |
|
| # define XS_INTERNAL(name) XS(name) |
| 100 |
|
| #endif |
| 101 |
|
| |
| 102 |
|
| /* Now, finally, after all this mess, we want an XS::Install::FrozenShit::ParseXS |
| 103 |
|
| * internal macro that we're free to redefine for varying linkage due |
| 104 |
|
| * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use |
| 105 |
|
| * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! |
| 106 |
|
| */ |
| 107 |
|
| |
| 108 |
|
| #undef XS_EUPXS |
| 109 |
|
| #if defined(PERL_EUPXS_ALWAYS_EXPORT) |
| 110 |
|
| # define XS_EUPXS(name) XS_EXTERNAL(name) |
| 111 |
|
| #else |
| 112 |
|
| /* default to internal */ |
| 113 |
|
| # define XS_EUPXS(name) XS_INTERNAL(name) |
| 114 |
|
| #endif |
| 115 |
|
| |
| 116 |
|
| #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
| 117 |
|
| #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) |
| 118 |
|
| |
| 119 |
|
| /* prototype to pass -Wmissing-prototypes */ |
| 120 |
|
| STATIC void |
| 121 |
|
| S_croak_xs_usage(const CV *const cv, const char *const params); |
| 122 |
|
| |
| 123 |
|
| STATIC void |
| 124 |
|
| S_croak_xs_usage(const CV *const cv, const char *const params) |
| 125 |
|
| { |
| 126 |
|
| const GV *const gv = CvGV(cv); |
| 127 |
|
| |
| 128 |
|
| PERL_ARGS_ASSERT_CROAK_XS_USAGE; |
| 129 |
|
| |
| 130 |
|
| if (gv) { |
| 131 |
|
| const char *const gvname = GvNAME(gv); |
| 132 |
|
| const HV *const stash = GvSTASH(gv); |
| 133 |
|
| const char *const hvname = stash ? HvNAME(stash) : NULL; |
| 134 |
|
| |
| 135 |
|
| if (hvname) |
| 136 |
|
| Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); |
| 137 |
|
| else |
| 138 |
|
| Perl_croak_nocontext("Usage: %s(%s)", gvname, params); |
| 139 |
|
| } else { |
| 140 |
|
| /* Pants. I don't think that it should be possible to get here. */ |
| 141 |
|
| Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); |
| 142 |
|
| } |
| 143 |
|
| } |
| 144 |
|
| #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE |
| 145 |
|
| |
| 146 |
|
| #define croak_xs_usage S_croak_xs_usage |
| 147 |
|
| |
| 148 |
|
| #endif |
| 149 |
|
| |
| 150 |
|
| /* NOTE: the prototype of newXSproto() is different in versions of perls, |
| 151 |
|
| * so we define a portable version of newXSproto() |
| 152 |
|
| */ |
| 153 |
|
| #ifdef newXS_flags |
| 154 |
|
| #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0) |
| 155 |
|
| #else |
| 156 |
|
| #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv) |
| 157 |
|
| #endif /* !defined(newXS_flags) */ |
| 158 |
|
| |
| 159 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 160 |
|
| # define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file) |
| 161 |
|
| #else |
| 162 |
|
| # define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b) |
| 163 |
|
| #endif |
| 164 |
|
| |
| 165 |
|
| /* simple backcompat versions of the TARGx() macros with no optimisation */ |
| 166 |
|
| #ifndef TARGi |
| 167 |
|
| # define TARGi(iv, do_taint) sv_setiv_mg(TARG, iv) |
| 168 |
|
| # define TARGu(uv, do_taint) sv_setuv_mg(TARG, uv) |
| 169 |
|
| # define TARGn(nv, do_taint) sv_setnv_mg(TARG, nv) |
| 170 |
|
| #endif |
| 171 |
|
| |
| 172 |
|
| #line 173 "xs/main_xsgen.cc" |
| 173 |
|
| |
| 174 |
|
| |
| 175 |
10 |
▶ | XS_EUPXS(XS_Date__strict_import) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__strict_import) { xs::throw_guard(cv, [=]() |
5 |
0 |
5 |
|
| 176 |
|
| { |
| 177 |
5 |
| dVAR; dXSARGS; |
| 178 |
5 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
5 |
5 |
|
| 179 |
0 |
| croak_xs_usage(cv, "_____unused1"); |
| 180 |
|
| PERL_UNUSED_VAR(ax); /* -Wall */ |
| 181 |
5 |
▶ | SP -= items; |
Branch: 1 branch
| Branch | True | False | Total |
| SP -= items; |
5 |
0 |
5 |
|
| 182 |
|
| { |
| 183 |
|
| #line 23 "xs/main.xs" |
| 184 |
|
| Scope::Hints::set(strict_hint_name, Simple(1)); |
| 185 |
|
| #line 186 "xs/main_xsgen.cc" |
| 186 |
5 |
| PUTBACK; |
| 187 |
5 |
| return; |
| 188 |
|
| } |
| 189 |
5 |
| }); } |
| 190 |
|
| |
| 191 |
|
| |
| 192 |
|
| |
| 193 |
2 |
▶ | XS_EUPXS(XS_Date__strict_unimport) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__strict_unimport) { xs::throw_guard(cv, [=]() |
1 |
0 |
1 |
|
| 194 |
|
| { |
| 195 |
1 |
| dVAR; dXSARGS; |
| 196 |
1 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
1 |
1 |
|
| 197 |
0 |
| croak_xs_usage(cv, "_____unused2"); |
| 198 |
|
| PERL_UNUSED_VAR(ax); /* -Wall */ |
| 199 |
1 |
| SP -= items; |
| 200 |
|
| { |
| 201 |
|
| #line 27 "xs/main.xs" |
| 202 |
|
| Scope::Hints::remove(strict_hint_name); |
| 203 |
|
| #line 204 "xs/main_xsgen.cc" |
| 204 |
1 |
| PUTBACK; |
| 205 |
1 |
| return; |
| 206 |
|
| } |
| 207 |
1 |
| }); } |
| 208 |
|
| |
| 209 |
|
| |
| 210 |
|
| /* INCLUDE: Including 'DateRel.xsi' from 'main.xs' */ |
| 211 |
|
| |
| 212 |
|
| #include "private.h" |
| 213 |
402 |
| static inline DateRel xs_daterel_ctor (SV* arg, SV* till) { |
| 214 |
420 |
▶ | return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
Branch: 19 branches
| Branch | True | False | Total |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
395 |
402 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
0 |
7 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
0 |
7 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
0 |
7 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
392 |
3 |
395 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
392 |
7 |
399 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
392 |
399 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
392 |
399 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
392 |
399 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
392 |
399 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
392 |
399 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
7 |
392 |
399 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
3 |
0 |
3 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
0 |
3 |
3 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
0 |
3 |
3 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
0 |
3 |
3 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
0 |
3 |
3 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
0 |
3 |
3 |
| return till ? DateRel(sv2date(arg), sv2date(till)) : sv2daterel(arg); |
0 |
3 |
3 |
|
| 215 |
|
| } |
| 216 |
10 |
| static inline DateRel xs_daterel_ymd (SV** args, I32 items) { |
| 217 |
10 |
| ptime_t vals[8] = {0, 0, 0, 0, 0, 0, 0, 0}; |
| 218 |
10 |
▶ | list2vals(args, items, vals); |
Branch: 1 branch
| Branch | True | False | Total |
| list2vals(args, items, vals); |
10 |
0 |
10 |
|
| 219 |
20 |
▶ | return DateRel(vals[0], vals[1], vals[2], vals[3], vals[4], vals[5]); |
Branch: 1 branch
| Branch | True | False | Total |
| return DateRel(vals[0], vals[1], vals[2], vals[3], vals[4], vals[5]); |
10 |
0 |
10 |
|
| 220 |
|
| } |
| 221 |
|
| |
| 222 |
|
| |
| 223 |
72 |
▶ | XS_EUPXS(XS_Date_rdate) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_rdate) { xs::throw_guard(cv, [=]() |
35 |
0 |
35 |
|
| 224 |
|
| { |
| 225 |
36 |
| dVAR; dXSARGS; |
| 226 |
36 |
▶ | if (items < 0 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 0 || items > 2) |
36 |
0 |
36 |
| if (items < 0 || items > 2) |
0 |
36 |
36 |
|
| 227 |
0 |
| croak_xs_usage(cv, "from= {}, till= {}"); |
| 228 |
|
| { |
| 229 |
|
| DateRel * RETVAL; |
| 230 |
|
| SV* from; |
| 231 |
|
| SV* till; |
| 232 |
|
| |
| 233 |
36 |
▶ | if (items < 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 1) |
4 |
32 |
36 |
|
| 234 |
4 |
| from = {}; |
| 235 |
|
| else { |
| 236 |
32 |
| from = ST(0) |
| 237 |
|
| ; |
| 238 |
|
| } |
| 239 |
|
| |
| 240 |
36 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
29 |
7 |
36 |
|
| 241 |
29 |
| till = {}; |
| 242 |
|
| else { |
| 243 |
7 |
| till = ST(1) |
| 244 |
|
| ; |
| 245 |
|
| } |
| 246 |
|
| #line 37 "xs/DateRel.xsi" |
| 247 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 248 |
|
| RETVAL = new DateRel(xs_daterel_ctor(from, till)); |
| 249 |
|
| #line 250 "xs/main_xsgen.cc" |
| 250 |
|
| { |
| 251 |
|
| SV * RETVALSV; |
| 252 |
35 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
35 |
0 |
35 |
|
| 253 |
35 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
35 |
0 |
35 |
|
| 254 |
35 |
| ST(0) = RETVALSV; |
| 255 |
|
| } |
| 256 |
36 |
| } |
| 257 |
35 |
| XSRETURN(1); |
| 258 |
35 |
| }); } |
| 259 |
|
| |
| 260 |
|
| |
| 261 |
|
| |
| 262 |
8 |
▶ | XS_EUPXS(XS_Date_rdate_ymd) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_rdate_ymd) { xs::throw_guard(cv, [=]() |
4 |
0 |
4 |
|
| 263 |
|
| { |
| 264 |
4 |
| dVAR; dXSARGS; |
| 265 |
|
| PERL_UNUSED_VAR(cv); /* -W */ |
| 266 |
|
| PERL_UNUSED_VAR(items); /* -W */ |
| 267 |
|
| { |
| 268 |
|
| DateRel * RETVAL; |
| 269 |
|
| #line 41 "xs/DateRel.xsi" |
| 270 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 271 |
|
| RETVAL = new DateRel(xs_daterel_ymd(&ST(0), items)); |
| 272 |
|
| #line 273 "xs/main_xsgen.cc" |
| 273 |
|
| { |
| 274 |
|
| SV * RETVALSV; |
| 275 |
4 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
4 |
0 |
4 |
|
| 276 |
4 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
4 |
0 |
4 |
|
| 277 |
4 |
| ST(0) = RETVALSV; |
| 278 |
|
| } |
| 279 |
4 |
| } |
| 280 |
4 |
| XSRETURN(1); |
| 281 |
4 |
| }); } |
| 282 |
|
| |
| 283 |
|
| |
| 284 |
|
| |
| 285 |
674 |
▶ | XS_EUPXS(XS_Date_rdate_const) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_rdate_const) { xs::throw_guard(cv, [=]() |
337 |
0 |
337 |
|
| 286 |
|
| { |
| 287 |
337 |
| dVAR; dXSARGS; |
| 288 |
337 |
▶ | if (items < 0 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 0 || items > 2) |
337 |
0 |
337 |
| if (items < 0 || items > 2) |
0 |
337 |
337 |
|
| 289 |
0 |
| croak_xs_usage(cv, "from= {}, till= {}"); |
| 290 |
|
| { |
| 291 |
|
| const DateRel * RETVAL; |
| 292 |
|
| SV* from; |
| 293 |
|
| SV* till; |
| 294 |
|
| |
| 295 |
337 |
▶ | if (items < 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 1) |
0 |
337 |
337 |
|
| 296 |
0 |
| from = {}; |
| 297 |
|
| else { |
| 298 |
337 |
| from = ST(0) |
| 299 |
|
| ; |
| 300 |
|
| } |
| 301 |
|
| |
| 302 |
337 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
337 |
0 |
337 |
|
| 303 |
337 |
| till = {}; |
| 304 |
|
| else { |
| 305 |
0 |
| till = ST(1) |
| 306 |
|
| ; |
| 307 |
|
| } |
| 308 |
|
| #line 45 "xs/DateRel.xsi" |
| 309 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 310 |
|
| RETVAL = new DateRel(xs_daterel_ctor(from, till)); |
| 311 |
|
| #line 312 "xs/main_xsgen.cc" |
| 312 |
|
| { |
| 313 |
|
| SV * RETVALSV; |
| 314 |
337 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
337 |
0 |
337 |
|
| 315 |
337 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
337 |
0 |
337 |
|
| 316 |
337 |
| ST(0) = RETVALSV; |
| 317 |
|
| } |
| 318 |
337 |
| } |
| 319 |
337 |
| XSRETURN(1); |
| 320 |
337 |
| }); } |
| 321 |
|
| |
| 322 |
|
| |
| 323 |
|
| |
| 324 |
0 |
▶ | XS_EUPXS(XS_Date_rdate_ymd_const) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_rdate_ymd_const) { xs::throw_guard(cv, [=]() |
0 |
0 |
0 |
|
| 325 |
|
| { |
| 326 |
0 |
| dVAR; dXSARGS; |
| 327 |
|
| PERL_UNUSED_VAR(cv); /* -W */ |
| 328 |
|
| PERL_UNUSED_VAR(items); /* -W */ |
| 329 |
|
| { |
| 330 |
|
| const DateRel * RETVAL; |
| 331 |
|
| #line 49 "xs/DateRel.xsi" |
| 332 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 333 |
|
| RETVAL = new DateRel(xs_daterel_ymd(&ST(0), items)); |
| 334 |
|
| #line 335 "xs/main_xsgen.cc" |
| 335 |
|
| { |
| 336 |
|
| SV * RETVALSV; |
| 337 |
0 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
0 |
0 |
0 |
|
| 338 |
0 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
0 |
0 |
0 |
|
| 339 |
0 |
| ST(0) = RETVALSV; |
| 340 |
|
| } |
| 341 |
0 |
| } |
| 342 |
0 |
| XSRETURN(1); |
| 343 |
0 |
| }); } |
| 344 |
|
| |
| 345 |
|
| |
| 346 |
|
| |
| 347 |
50 |
▶ | XS_EUPXS(XS_Date__Rel_new) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_new) { xs::throw_guard(cv, [=]() |
24 |
0 |
24 |
|
| 348 |
|
| { |
| 349 |
25 |
| dVAR; dXSARGS; |
| 350 |
25 |
▶ | if (items < 1 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 3) |
25 |
0 |
25 |
| if (items < 1 || items > 3) |
0 |
25 |
25 |
|
| 351 |
0 |
| croak_xs_usage(cv, "_____unused3, from= {}, till= {}"); |
| 352 |
|
| { |
| 353 |
|
| DateRel * RETVAL; |
| 354 |
|
| SV* from; |
| 355 |
|
| SV* till; |
| 356 |
|
| |
| 357 |
25 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
2 |
23 |
25 |
|
| 358 |
2 |
| from = {}; |
| 359 |
|
| else { |
| 360 |
23 |
| from = ST(1) |
| 361 |
|
| ; |
| 362 |
|
| } |
| 363 |
|
| |
| 364 |
25 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
25 |
0 |
25 |
|
| 365 |
25 |
| till = {}; |
| 366 |
|
| else { |
| 367 |
0 |
| till = ST(2) |
| 368 |
|
| ; |
| 369 |
|
| } |
| 370 |
|
| #line 57 "xs/DateRel.xsi" |
| 371 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 372 |
|
| RETVAL = new DateRel(xs_daterel_ctor(from, till)); |
| 373 |
|
| #line 374 "xs/main_xsgen.cc" |
| 374 |
|
| { |
| 375 |
|
| SV * RETVALSV; |
| 376 |
24 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
24 |
0 |
24 |
|
| 377 |
24 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
24 |
0 |
24 |
|
| 378 |
24 |
| ST(0) = RETVALSV; |
| 379 |
|
| } |
| 380 |
25 |
| } |
| 381 |
24 |
| XSRETURN(1); |
| 382 |
24 |
| }); } |
| 383 |
|
| |
| 384 |
|
| |
| 385 |
|
| |
| 386 |
8 |
▶ | XS_EUPXS(XS_Date__Rel_new_ymd) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_new_ymd) { xs::throw_guard(cv, [=]() |
4 |
0 |
4 |
|
| 387 |
|
| { |
| 388 |
4 |
| dVAR; dXSARGS; |
| 389 |
|
| PERL_UNUSED_VAR(cv); /* -W */ |
| 390 |
|
| PERL_UNUSED_VAR(items); /* -W */ |
| 391 |
|
| { |
| 392 |
|
| DateRel * RETVAL; |
| 393 |
|
| #line 61 "xs/DateRel.xsi" |
| 394 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 395 |
|
| RETVAL = new DateRel(xs_daterel_ymd(&ST(1), items - 1)); |
| 396 |
|
| #line 397 "xs/main_xsgen.cc" |
| 397 |
|
| { |
| 398 |
|
| SV * RETVALSV; |
| 399 |
4 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
4 |
0 |
4 |
|
| 400 |
4 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
4 |
0 |
4 |
|
| 401 |
4 |
| ST(0) = RETVALSV; |
| 402 |
|
| } |
| 403 |
4 |
| } |
| 404 |
4 |
| XSRETURN(1); |
| 405 |
4 |
| }); } |
| 406 |
|
| |
| 407 |
|
| |
| 408 |
|
| |
| 409 |
72 |
▶ | XS_EUPXS(XS_Date__Rel_set) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_set) { xs::throw_guard(cv, [=]() |
3 |
0 |
3 |
|
| 410 |
|
| { |
| 411 |
36 |
| dVAR; dXSARGS; |
| 412 |
36 |
▶ | if (items < 2 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 2 || items > 3) |
36 |
0 |
36 |
| if (items < 2 || items > 3) |
0 |
36 |
36 |
|
| 413 |
0 |
| croak_xs_usage(cv, "THIS, from, till= {}"); |
| 414 |
|
| PERL_UNUSED_VAR(ax); /* -Wall */ |
| 415 |
36 |
| SP -= items; |
| 416 |
|
| { |
| 417 |
36 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
4 |
4 |
|
| 418 |
|
| ; |
| 419 |
4 |
| SV* from = ST(1) |
| 420 |
|
| ; |
| 421 |
|
| SV* till; |
| 422 |
|
| |
| 423 |
4 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
4 |
0 |
4 |
|
| 424 |
4 |
| till = {}; |
| 425 |
|
| else { |
| 426 |
0 |
| till = ST(2) |
| 427 |
|
| ; |
| 428 |
|
| } |
| 429 |
|
| #line 65 "xs/DateRel.xsi" |
| 430 |
|
| *THIS = xs_daterel_ctor(from, till); |
| 431 |
|
| #line 432 "xs/main_xsgen.cc" |
| 432 |
3 |
| PUTBACK; |
| 433 |
3 |
| return; |
| 434 |
|
| } |
| 435 |
3 |
| }); } |
| 436 |
|
| |
| 437 |
|
| |
| 438 |
|
| |
| 439 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_set_ymd) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_set_ymd) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 440 |
|
| { |
| 441 |
2 |
| dVAR; dXSARGS; |
| 442 |
2 |
▶ | if (items < 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 1) |
0 |
2 |
2 |
|
| 443 |
0 |
| croak_xs_usage(cv, "THIS, ..."); |
| 444 |
|
| PERL_UNUSED_VAR(ax); /* -Wall */ |
| 445 |
2 |
| SP -= items; |
| 446 |
|
| { |
| 447 |
2 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 448 |
|
| ; |
| 449 |
|
| #line 69 "xs/DateRel.xsi" |
| 450 |
|
| *THIS = xs_daterel_ymd(&ST(1), items - 1); |
| 451 |
|
| #line 452 "xs/main_xsgen.cc" |
| 452 |
2 |
| PUTBACK; |
| 453 |
2 |
| return; |
| 454 |
|
| } |
| 455 |
2 |
| }); } |
| 456 |
|
| |
| 457 |
|
| |
| 458 |
|
| |
| 459 |
2 |
▶ | XS_EUPXS(XS_Date__Rel_error) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_error) { xs::throw_guard(cv, [=]() |
1 |
0 |
1 |
|
| 460 |
|
| { |
| 461 |
1 |
| dVAR; dXSARGS; |
| 462 |
1 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
1 |
1 |
|
| 463 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 464 |
|
| { |
| 465 |
1 |
| std::error_code RETVAL; |
| 466 |
1 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
1 |
0 |
1 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
1 |
1 |
|
| 467 |
|
| ; |
| 468 |
|
| #line 72 "xs/DateRel.xsi" |
| 469 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 470 |
|
| RETVAL = THIS->error(); |
| 471 |
|
| #line 472 "xs/main_xsgen.cc" |
| 472 |
|
| { |
| 473 |
|
| SV * RETVALSV; |
| 474 |
1 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
1 |
0 |
1 |
|
| 475 |
1 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
1 |
0 |
1 |
|
| 476 |
1 |
| ST(0) = RETVALSV; |
| 477 |
|
| } |
| 478 |
1 |
| } |
| 479 |
1 |
| XSRETURN(1); |
| 480 |
1 |
| }); } |
| 481 |
|
| |
| 482 |
|
| |
| 483 |
|
| |
| 484 |
42 |
▶ | XS_EUPXS(XS_Date__Rel_sec) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_sec) { xs::throw_guard(cv, [=]() |
13 |
0 |
13 |
|
| 485 |
|
| { |
| 486 |
21 |
| dVAR; dXSARGS; |
| 487 |
21 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
21 |
0 |
21 |
| if (items < 1 || items > 2) |
0 |
21 |
21 |
|
| 488 |
0 |
| croak_xs_usage(cv, "THIS, newval= NULL"); |
| 489 |
|
| { |
| 490 |
|
| ptime_t RETVAL; |
| 491 |
21 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
13 |
8 |
21 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
13 |
13 |
|
| 492 |
|
| ; |
| 493 |
|
| SV* newval; |
| 494 |
|
| |
| 495 |
13 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
13 |
0 |
13 |
|
| 496 |
13 |
| newval = NULL; |
| 497 |
|
| else { |
| 498 |
0 |
| newval = ST(1) |
| 499 |
|
| ; |
| 500 |
|
| } |
| 501 |
|
| #line 75 "xs/DateRel.xsi" |
| 502 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 503 |
|
| if (newval) { |
| 504 |
|
| THIS->sec(xs::in<ptime_t>(newval)); |
| 505 |
|
| } |
| 506 |
|
| RETVAL = THIS->sec(); |
| 507 |
|
| #line 508 "xs/main_xsgen.cc" |
| 508 |
|
| { |
| 509 |
|
| SV * RETVALSV; |
| 510 |
13 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
13 |
0 |
13 |
|
| 511 |
13 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
13 |
0 |
13 |
|
| 512 |
13 |
| ST(0) = RETVALSV; |
| 513 |
|
| } |
| 514 |
13 |
| } |
| 515 |
13 |
| XSRETURN(1); |
| 516 |
13 |
| }); } |
| 517 |
|
| |
| 518 |
|
| |
| 519 |
|
| |
| 520 |
42 |
▶ | XS_EUPXS(XS_Date__Rel_min) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_min) { xs::throw_guard(cv, [=]() |
13 |
0 |
13 |
|
| 521 |
|
| { |
| 522 |
21 |
| dVAR; dXSARGS; |
| 523 |
21 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
21 |
0 |
21 |
| if (items < 1 || items > 2) |
0 |
21 |
21 |
|
| 524 |
0 |
| croak_xs_usage(cv, "THIS, newval= NULL"); |
| 525 |
|
| { |
| 526 |
|
| ptime_t RETVAL; |
| 527 |
21 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
13 |
8 |
21 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
13 |
13 |
|
| 528 |
|
| ; |
| 529 |
|
| SV* newval; |
| 530 |
|
| |
| 531 |
13 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
13 |
0 |
13 |
|
| 532 |
13 |
| newval = NULL; |
| 533 |
|
| else { |
| 534 |
0 |
| newval = ST(1) |
| 535 |
|
| ; |
| 536 |
|
| } |
| 537 |
|
| #line 82 "xs/DateRel.xsi" |
| 538 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 539 |
|
| if (newval) THIS->min(xs::in<ptime_t>(newval)); |
| 540 |
|
| RETVAL = THIS->min(); |
| 541 |
|
| #line 542 "xs/main_xsgen.cc" |
| 542 |
|
| { |
| 543 |
|
| SV * RETVALSV; |
| 544 |
13 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
13 |
0 |
13 |
|
| 545 |
13 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
13 |
0 |
13 |
|
| 546 |
13 |
| ST(0) = RETVALSV; |
| 547 |
|
| } |
| 548 |
13 |
| } |
| 549 |
13 |
| XSRETURN(1); |
| 550 |
13 |
| }); } |
| 551 |
|
| |
| 552 |
|
| |
| 553 |
|
| |
| 554 |
42 |
▶ | XS_EUPXS(XS_Date__Rel_hour) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_hour) { xs::throw_guard(cv, [=]() |
13 |
0 |
13 |
|
| 555 |
|
| { |
| 556 |
21 |
| dVAR; dXSARGS; |
| 557 |
21 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
21 |
0 |
21 |
| if (items < 1 || items > 2) |
0 |
21 |
21 |
|
| 558 |
0 |
| croak_xs_usage(cv, "THIS, newval= NULL"); |
| 559 |
|
| { |
| 560 |
|
| ptime_t RETVAL; |
| 561 |
21 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
13 |
8 |
21 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
13 |
13 |
|
| 562 |
|
| ; |
| 563 |
|
| SV* newval; |
| 564 |
|
| |
| 565 |
13 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
13 |
0 |
13 |
|
| 566 |
13 |
| newval = NULL; |
| 567 |
|
| else { |
| 568 |
0 |
| newval = ST(1) |
| 569 |
|
| ; |
| 570 |
|
| } |
| 571 |
|
| #line 87 "xs/DateRel.xsi" |
| 572 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 573 |
|
| if (newval) { |
| 574 |
|
| THIS->hour(xs::in<ptime_t>(newval)); |
| 575 |
|
| } |
| 576 |
|
| RETVAL = THIS->hour(); |
| 577 |
|
| #line 578 "xs/main_xsgen.cc" |
| 578 |
|
| { |
| 579 |
|
| SV * RETVALSV; |
| 580 |
13 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
13 |
0 |
13 |
|
| 581 |
13 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
13 |
0 |
13 |
|
| 582 |
13 |
| ST(0) = RETVALSV; |
| 583 |
|
| } |
| 584 |
13 |
| } |
| 585 |
13 |
| XSRETURN(1); |
| 586 |
13 |
| }); } |
| 587 |
|
| |
| 588 |
|
| |
| 589 |
|
| |
| 590 |
36 |
▶ | XS_EUPXS(XS_Date__Rel_day) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_day) { xs::throw_guard(cv, [=]() |
10 |
0 |
10 |
|
| 591 |
|
| { |
| 592 |
18 |
| dVAR; dXSARGS; |
| 593 |
18 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
18 |
0 |
18 |
| if (items < 1 || items > 2) |
0 |
18 |
18 |
|
| 594 |
0 |
| croak_xs_usage(cv, "THIS, newval= NULL"); |
| 595 |
|
| { |
| 596 |
|
| ptime_t RETVAL; |
| 597 |
18 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
10 |
8 |
18 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
10 |
10 |
|
| 598 |
|
| ; |
| 599 |
|
| SV* newval; |
| 600 |
|
| |
| 601 |
10 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
10 |
0 |
10 |
|
| 602 |
10 |
| newval = NULL; |
| 603 |
|
| else { |
| 604 |
0 |
| newval = ST(1) |
| 605 |
|
| ; |
| 606 |
|
| } |
| 607 |
|
| #line 94 "xs/DateRel.xsi" |
| 608 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 609 |
|
| if (newval) { |
| 610 |
|
| THIS->day(xs::in<ptime_t>(newval)); |
| 611 |
|
| } |
| 612 |
|
| RETVAL = THIS->day(); |
| 613 |
|
| #line 614 "xs/main_xsgen.cc" |
| 614 |
|
| { |
| 615 |
|
| SV * RETVALSV; |
| 616 |
10 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10 |
0 |
10 |
|
| 617 |
10 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
10 |
0 |
10 |
|
| 618 |
10 |
| ST(0) = RETVALSV; |
| 619 |
|
| } |
| 620 |
10 |
| } |
| 621 |
10 |
| XSRETURN(1); |
| 622 |
10 |
| }); } |
| 623 |
|
| |
| 624 |
|
| |
| 625 |
|
| |
| 626 |
38 |
▶ | XS_EUPXS(XS_Date__Rel_month) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_month) { xs::throw_guard(cv, [=]() |
11 |
0 |
11 |
|
| 627 |
|
| { |
| 628 |
19 |
| dVAR; dXSARGS; |
| 629 |
19 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
19 |
0 |
19 |
| if (items < 1 || items > 2) |
0 |
19 |
19 |
|
| 630 |
0 |
| croak_xs_usage(cv, "THIS, newval= NULL"); |
| 631 |
|
| { |
| 632 |
|
| ptime_t RETVAL; |
| 633 |
19 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
11 |
8 |
19 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
11 |
11 |
|
| 634 |
|
| ; |
| 635 |
|
| SV* newval; |
| 636 |
|
| |
| 637 |
11 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
11 |
0 |
11 |
|
| 638 |
11 |
| newval = NULL; |
| 639 |
|
| else { |
| 640 |
0 |
| newval = ST(1) |
| 641 |
|
| ; |
| 642 |
|
| } |
| 643 |
|
| #line 101 "xs/DateRel.xsi" |
| 644 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 645 |
|
| if (newval) { |
| 646 |
|
| THIS->month(xs::in<ptime_t>(newval)); |
| 647 |
|
| } |
| 648 |
|
| RETVAL = THIS->month(); |
| 649 |
|
| #line 650 "xs/main_xsgen.cc" |
| 650 |
|
| { |
| 651 |
|
| SV * RETVALSV; |
| 652 |
11 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
11 |
0 |
11 |
|
| 653 |
11 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
11 |
0 |
11 |
|
| 654 |
11 |
| ST(0) = RETVALSV; |
| 655 |
|
| } |
| 656 |
11 |
| } |
| 657 |
11 |
| XSRETURN(1); |
| 658 |
11 |
| }); } |
| 659 |
|
| |
| 660 |
|
| |
| 661 |
|
| |
| 662 |
40 |
▶ | XS_EUPXS(XS_Date__Rel_year) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_year) { xs::throw_guard(cv, [=]() |
12 |
0 |
12 |
|
| 663 |
|
| { |
| 664 |
20 |
| dVAR; dXSARGS; |
| 665 |
20 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
20 |
0 |
20 |
| if (items < 1 || items > 2) |
0 |
20 |
20 |
|
| 666 |
0 |
| croak_xs_usage(cv, "THIS, newval= NULL"); |
| 667 |
|
| { |
| 668 |
|
| ptime_t RETVAL; |
| 669 |
20 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
12 |
8 |
20 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
12 |
12 |
|
| 670 |
|
| ; |
| 671 |
|
| SV* newval; |
| 672 |
|
| |
| 673 |
12 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
11 |
1 |
12 |
|
| 674 |
11 |
| newval = NULL; |
| 675 |
|
| else { |
| 676 |
1 |
| newval = ST(1) |
| 677 |
|
| ; |
| 678 |
|
| } |
| 679 |
|
| #line 108 "xs/DateRel.xsi" |
| 680 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 681 |
|
| if (newval) { |
| 682 |
|
| THIS->year(xs::in<ptime_t>(newval)); |
| 683 |
|
| } |
| 684 |
|
| RETVAL = THIS->year(); |
| 685 |
|
| #line 686 "xs/main_xsgen.cc" |
| 686 |
|
| { |
| 687 |
|
| SV * RETVALSV; |
| 688 |
12 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
12 |
0 |
12 |
|
| 689 |
12 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
12 |
0 |
12 |
|
| 690 |
12 |
| ST(0) = RETVALSV; |
| 691 |
|
| } |
| 692 |
12 |
| } |
| 693 |
12 |
| XSRETURN(1); |
| 694 |
12 |
| }); } |
| 695 |
|
| |
| 696 |
|
| |
| 697 |
|
| |
| 698 |
12 |
▶ | XS_EUPXS(XS_Date__Rel_from) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_from) { xs::throw_guard(cv, [=]() |
6 |
0 |
6 |
|
| 699 |
|
| { |
| 700 |
6 |
| dVAR; dXSARGS; |
| 701 |
6 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
6 |
0 |
6 |
| if (items < 1 || items > 2) |
0 |
6 |
6 |
|
| 702 |
0 |
| croak_xs_usage(cv, "THIS, fromSV= NULL"); |
| 703 |
|
| { |
| 704 |
|
| Date * RETVAL; |
| 705 |
6 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
6 |
0 |
6 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
6 |
6 |
|
| 706 |
|
| ; |
| 707 |
|
| SV* fromSV; |
| 708 |
|
| |
| 709 |
6 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
4 |
2 |
6 |
|
| 710 |
4 |
| fromSV = NULL; |
| 711 |
|
| else { |
| 712 |
2 |
| fromSV = ST(1) |
| 713 |
|
| ; |
| 714 |
|
| } |
| 715 |
|
| #line 115 "xs/DateRel.xsi" |
| 716 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 717 |
|
| if (fromSV) { |
| 718 |
|
| THIS->from(sv2date(fromSV)); |
| 719 |
|
| XSRETURN_UNDEF; |
| 720 |
|
| } |
| 721 |
|
| if (!THIS->from()) XSRETURN_UNDEF; |
| 722 |
|
| RETVAL = new Date(*(THIS->from())); |
| 723 |
|
| #line 724 "xs/main_xsgen.cc" |
| 724 |
|
| { |
| 725 |
|
| SV * RETVALSV; |
| 726 |
4 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
4 |
0 |
4 |
|
| 727 |
4 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
4 |
0 |
4 |
|
| 728 |
4 |
| ST(0) = RETVALSV; |
| 729 |
|
| } |
| 730 |
6 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
4 |
2 |
6 |
|
| 731 |
4 |
| XSRETURN(1); |
| 732 |
6 |
| }); } |
| 733 |
|
| |
| 734 |
|
| |
| 735 |
|
| |
| 736 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_till) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_till) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 737 |
|
| { |
| 738 |
2 |
| dVAR; dXSARGS; |
| 739 |
2 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
2 |
2 |
|
| 740 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 741 |
|
| { |
| 742 |
|
| Date * RETVAL; |
| 743 |
2 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
2 |
0 |
2 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 744 |
|
| ; |
| 745 |
|
| #line 124 "xs/DateRel.xsi" |
| 746 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 747 |
|
| auto till = THIS->till(); |
| 748 |
|
| if (!till) XSRETURN_UNDEF; |
| 749 |
|
| RETVAL = new Date(*till); |
| 750 |
|
| #line 751 "xs/main_xsgen.cc" |
| 751 |
|
| { |
| 752 |
|
| SV * RETVALSV; |
| 753 |
2 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
2 |
0 |
2 |
|
| 754 |
2 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
2 |
0 |
2 |
|
| 755 |
2 |
| ST(0) = RETVALSV; |
| 756 |
|
| } |
| 757 |
2 |
▶ | } |
Branch: 2 branches
| Branch | True | False | Total |
| } |
2 |
0 |
2 |
| } |
2 |
0 |
2 |
|
| 758 |
2 |
| XSRETURN(1); |
| 759 |
2 |
| }); } |
| 760 |
|
| |
| 761 |
|
| |
| 762 |
|
| |
| 763 |
42 |
▶ | XS_EUPXS(XS_Date__Rel_to_secs) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_secs) { xs::throw_guard(cv, [=]() |
21 |
0 |
21 |
|
| 764 |
|
| { |
| 765 |
21 |
| dVAR; dXSARGS; |
| 766 |
21 |
| dXSI32; |
| 767 |
21 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
21 |
21 |
|
| 768 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 769 |
|
| { |
| 770 |
|
| ptime_t RETVAL; |
| 771 |
21 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
21 |
0 |
21 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
21 |
21 |
|
| 772 |
|
| ; |
| 773 |
|
| #line 130 "xs/DateRel.xsi" |
| 774 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 775 |
|
| PERL_UNUSED_VAR(ix); |
| 776 |
|
| RETVAL = THIS->to_secs(); |
| 777 |
|
| #line 778 "xs/main_xsgen.cc" |
| 778 |
|
| { |
| 779 |
|
| SV * RETVALSV; |
| 780 |
21 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
21 |
0 |
21 |
|
| 781 |
21 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
21 |
0 |
21 |
|
| 782 |
21 |
| ST(0) = RETVALSV; |
| 783 |
|
| } |
| 784 |
21 |
| } |
| 785 |
21 |
| XSRETURN(1); |
| 786 |
21 |
| }); } |
| 787 |
|
| |
| 788 |
|
| |
| 789 |
|
| |
| 790 |
8 |
▶ | XS_EUPXS(XS_Date__Rel_to_mins) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_mins) { xs::throw_guard(cv, [=]() |
4 |
0 |
4 |
|
| 791 |
|
| { |
| 792 |
4 |
| dVAR; dXSARGS; |
| 793 |
4 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
4 |
4 |
|
| 794 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 795 |
|
| { |
| 796 |
|
| double RETVAL; |
| 797 |
4 |
▶ | dXSTARG; |
Branch: 1 branch
| Branch | True | False | Total |
| dXSTARG; |
4 |
0 |
4 |
|
| 798 |
4 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
4 |
4 |
|
| 799 |
|
| ; |
| 800 |
|
| #line 134 "xs/DateRel.xsi" |
| 801 |
|
| RETVAL = THIS->to_mins(); |
| 802 |
|
| #line 803 "xs/main_xsgen.cc" |
| 803 |
4 |
▶ | TARGn((double)RETVAL, 1); |
Branch: 1 branch
| Branch | True | False | Total |
| TARGn((double)RETVAL, 1); |
0 |
4 |
4 |
|
| 804 |
4 |
| ST(0) = TARG; |
| 805 |
|
| } |
| 806 |
4 |
| XSRETURN(1); |
| 807 |
4 |
| }); } |
| 808 |
|
| |
| 809 |
|
| |
| 810 |
|
| |
| 811 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_to_hours) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_hours) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 812 |
|
| { |
| 813 |
2 |
| dVAR; dXSARGS; |
| 814 |
2 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
2 |
2 |
|
| 815 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 816 |
|
| { |
| 817 |
|
| double RETVAL; |
| 818 |
2 |
▶ | dXSTARG; |
Branch: 1 branch
| Branch | True | False | Total |
| dXSTARG; |
2 |
0 |
2 |
|
| 819 |
2 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 820 |
|
| ; |
| 821 |
|
| #line 136 "xs/DateRel.xsi" |
| 822 |
|
| RETVAL = THIS->to_hours(); |
| 823 |
|
| #line 824 "xs/main_xsgen.cc" |
| 824 |
2 |
▶ | TARGn((double)RETVAL, 1); |
Branch: 1 branch
| Branch | True | False | Total |
| TARGn((double)RETVAL, 1); |
0 |
2 |
2 |
|
| 825 |
2 |
| ST(0) = TARG; |
| 826 |
|
| } |
| 827 |
2 |
| XSRETURN(1); |
| 828 |
2 |
| }); } |
| 829 |
|
| |
| 830 |
|
| |
| 831 |
|
| |
| 832 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_to_days) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_days) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 833 |
|
| { |
| 834 |
2 |
| dVAR; dXSARGS; |
| 835 |
2 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
2 |
2 |
|
| 836 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 837 |
|
| { |
| 838 |
|
| double RETVAL; |
| 839 |
2 |
▶ | dXSTARG; |
Branch: 1 branch
| Branch | True | False | Total |
| dXSTARG; |
2 |
0 |
2 |
|
| 840 |
2 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 841 |
|
| ; |
| 842 |
|
| #line 138 "xs/DateRel.xsi" |
| 843 |
|
| RETVAL = THIS->to_days(); |
| 844 |
|
| #line 845 "xs/main_xsgen.cc" |
| 845 |
2 |
▶ | TARGn((double)RETVAL, 1); |
Branch: 1 branch
| Branch | True | False | Total |
| TARGn((double)RETVAL, 1); |
0 |
2 |
2 |
|
| 846 |
2 |
| ST(0) = TARG; |
| 847 |
|
| } |
| 848 |
2 |
| XSRETURN(1); |
| 849 |
2 |
| }); } |
| 850 |
|
| |
| 851 |
|
| |
| 852 |
|
| |
| 853 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_to_months) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_months) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 854 |
|
| { |
| 855 |
2 |
| dVAR; dXSARGS; |
| 856 |
2 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
2 |
2 |
|
| 857 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 858 |
|
| { |
| 859 |
|
| double RETVAL; |
| 860 |
2 |
▶ | dXSTARG; |
Branch: 1 branch
| Branch | True | False | Total |
| dXSTARG; |
2 |
0 |
2 |
|
| 861 |
2 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 862 |
|
| ; |
| 863 |
|
| #line 140 "xs/DateRel.xsi" |
| 864 |
|
| RETVAL = THIS->to_months(); |
| 865 |
|
| #line 866 "xs/main_xsgen.cc" |
| 866 |
2 |
▶ | TARGn((double)RETVAL, 1); |
Branch: 1 branch
| Branch | True | False | Total |
| TARGn((double)RETVAL, 1); |
0 |
2 |
2 |
|
| 867 |
2 |
| ST(0) = TARG; |
| 868 |
|
| } |
| 869 |
2 |
| XSRETURN(1); |
| 870 |
2 |
| }); } |
| 871 |
|
| |
| 872 |
|
| |
| 873 |
|
| |
| 874 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_to_years) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_years) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 875 |
|
| { |
| 876 |
2 |
| dVAR; dXSARGS; |
| 877 |
2 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
2 |
2 |
|
| 878 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 879 |
|
| { |
| 880 |
|
| double RETVAL; |
| 881 |
2 |
▶ | dXSTARG; |
Branch: 1 branch
| Branch | True | False | Total |
| dXSTARG; |
2 |
0 |
2 |
|
| 882 |
2 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 883 |
|
| ; |
| 884 |
|
| #line 142 "xs/DateRel.xsi" |
| 885 |
|
| RETVAL = THIS->to_years(); |
| 886 |
|
| #line 887 "xs/main_xsgen.cc" |
| 887 |
2 |
▶ | TARGn((double)RETVAL, 1); |
Branch: 1 branch
| Branch | True | False | Total |
| TARGn((double)RETVAL, 1); |
0 |
2 |
2 |
|
| 888 |
2 |
| ST(0) = TARG; |
| 889 |
|
| } |
| 890 |
2 |
| XSRETURN(1); |
| 891 |
2 |
| }); } |
| 892 |
|
| |
| 893 |
|
| |
| 894 |
|
| |
| 895 |
106 |
▶ | XS_EUPXS(XS_Date__Rel_to_string) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_string) { xs::throw_guard(cv, [=]() |
53 |
0 |
53 |
|
| 896 |
|
| { |
| 897 |
53 |
| dVAR; dXSARGS; |
| 898 |
53 |
▶ | if (items < 1 || items > 2) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 1 || items > 2) |
53 |
0 |
53 |
| if (items < 1 || items > 2) |
0 |
53 |
53 |
|
| 899 |
0 |
| croak_xs_usage(cv, "THIS, format= (int)DateRel::Format::simple"); |
| 900 |
|
| { |
| 901 |
53 |
| string RETVAL; |
| 902 |
53 |
▶ | dXSTARG; |
Branch: 2 branches
| Branch | True | False | Total |
| dXSTARG; |
53 |
0 |
53 |
| dXSTARG; |
0 |
0 |
0 |
|
| 903 |
53 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
53 |
0 |
53 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
53 |
53 |
|
| 904 |
|
| ; |
| 905 |
|
| int format; |
| 906 |
|
| |
| 907 |
53 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
29 |
24 |
53 |
|
| 908 |
29 |
| format = (int)DateRel::Format::simple; |
| 909 |
|
| else { |
| 910 |
24 |
▶ | format = (int)SvIV(ST(1)) |
Branch: 1 branch
| Branch | True | False | Total |
| format = (int)SvIV(ST(1)) |
24 |
0 |
24 |
|
| 911 |
|
| ; |
| 912 |
|
| } |
| 913 |
|
| #line 145 "xs/DateRel.xsi" |
| 914 |
|
| RETVAL = THIS->to_string((DateRel::Format)format); |
| 915 |
|
| #line 916 "xs/main_xsgen.cc" |
| 916 |
53 |
▶ | sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
Branch: 1 branch
| Branch | True | False | Total |
| sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
53 |
0 |
53 |
|
| 917 |
53 |
| ST(0) = TARG; |
| 918 |
53 |
| } |
| 919 |
53 |
| XSRETURN(1); |
| 920 |
53 |
| }); } |
| 921 |
|
| |
| 922 |
|
| |
| 923 |
|
| |
| 924 |
10 |
▶ | XS_EUPXS(XS_Date__Rel__op_str) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel__op_str) { xs::throw_guard(cv, [=]() |
5 |
0 |
5 |
|
| 925 |
|
| { |
| 926 |
5 |
| dVAR; dXSARGS; |
| 927 |
5 |
▶ | if (items < 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 1) |
0 |
5 |
5 |
|
| 928 |
0 |
| croak_xs_usage(cv, "THIS, ..."); |
| 929 |
|
| { |
| 930 |
5 |
| string RETVAL; |
| 931 |
5 |
▶ | dXSTARG; |
Branch: 2 branches
| Branch | True | False | Total |
| dXSTARG; |
0 |
5 |
5 |
| dXSTARG; |
5 |
0 |
5 |
|
| 932 |
5 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
5 |
0 |
5 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
5 |
5 |
|
| 933 |
|
| ; |
| 934 |
|
| #line 149 "xs/DateRel.xsi" |
| 935 |
|
| RETVAL = THIS->to_string(); |
| 936 |
|
| #line 937 "xs/main_xsgen.cc" |
| 937 |
5 |
▶ | sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
Branch: 1 branch
| Branch | True | False | Total |
| sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
5 |
0 |
5 |
|
| 938 |
5 |
| ST(0) = TARG; |
| 939 |
5 |
| } |
| 940 |
5 |
| XSRETURN(1); |
| 941 |
5 |
| }); } |
| 942 |
|
| |
| 943 |
|
| |
| 944 |
|
| |
| 945 |
0 |
▶ | XS_EUPXS(XS_Date__Rel_to_bool) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_bool) { xs::throw_guard(cv, [=]() |
0 |
0 |
0 |
|
| 946 |
|
| { |
| 947 |
0 |
| dVAR; dXSARGS; |
| 948 |
0 |
▶ | if (items < 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 1) |
0 |
0 |
0 |
|
| 949 |
0 |
| croak_xs_usage(cv, "THIS, ..."); |
| 950 |
|
| { |
| 951 |
|
| bool RETVAL; |
| 952 |
0 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
|
| 953 |
|
| ; |
| 954 |
|
| #line 153 "xs/DateRel.xsi" |
| 955 |
|
| RETVAL = THIS->duration(); |
| 956 |
|
| #line 957 "xs/main_xsgen.cc" |
| 957 |
0 |
▶ | ST(0) = boolSV(RETVAL); |
Branch: 1 branch
| Branch | True | False | Total |
| ST(0) = boolSV(RETVAL); |
0 |
0 |
0 |
|
| 958 |
|
| } |
| 959 |
0 |
| XSRETURN(1); |
| 960 |
0 |
| }); } |
| 961 |
|
| |
| 962 |
|
| |
| 963 |
|
| |
| 964 |
6 |
▶ | XS_EUPXS(XS_Date__Rel_to_number) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_to_number) { xs::throw_guard(cv, [=]() |
3 |
0 |
3 |
|
| 965 |
|
| { |
| 966 |
3 |
| dVAR; dXSARGS; |
| 967 |
3 |
▶ | if (items < 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 1) |
0 |
3 |
3 |
|
| 968 |
0 |
| croak_xs_usage(cv, "THIS, ..."); |
| 969 |
|
| { |
| 970 |
|
| ptime_t RETVAL; |
| 971 |
3 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
3 |
0 |
3 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
3 |
3 |
|
| 972 |
|
| ; |
| 973 |
|
| #line 157 "xs/DateRel.xsi" |
| 974 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 975 |
|
| RETVAL = THIS->duration(); |
| 976 |
|
| #line 977 "xs/main_xsgen.cc" |
| 977 |
|
| { |
| 978 |
|
| SV * RETVALSV; |
| 979 |
3 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
3 |
0 |
3 |
|
| 980 |
3 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
3 |
0 |
3 |
|
| 981 |
3 |
| ST(0) = RETVALSV; |
| 982 |
|
| } |
| 983 |
3 |
| } |
| 984 |
3 |
| XSRETURN(1); |
| 985 |
3 |
| }); } |
| 986 |
|
| |
| 987 |
|
| |
| 988 |
|
| |
| 989 |
40 |
▶ | XS_EUPXS(XS_Date__Rel_sum) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_sum) { xs::throw_guard(cv, [=]() |
20 |
0 |
20 |
|
| 990 |
|
| { |
| 991 |
20 |
| dVAR; dXSARGS; |
| 992 |
20 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
0 |
20 |
20 |
|
| 993 |
0 |
| croak_xs_usage(cv, "THIS, arg, ..."); |
| 994 |
|
| { |
| 995 |
20 |
| Sv RETVAL; |
| 996 |
20 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
20 |
0 |
20 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
20 |
20 |
|
| 997 |
|
| ; |
| 998 |
20 |
| Sv arg = ST(1) |
| 999 |
|
| ; |
| 1000 |
|
| #line 161 "xs/DateRel.xsi" |
| 1001 |
|
| if (arg.is_object_ref()) { |
| 1002 |
|
| Stash s = Object(arg).stash(); |
| 1003 |
|
| if (s.name() == "Date") RETVAL = xs::out(new Date(*xs::in<Date*>(arg) + *THIS)); |
| 1004 |
|
| else RETVAL = xs::out(new DateRel(*THIS + *xs::in<const DateRel*>(arg)), Object(ST(0)).stash()); |
| 1005 |
|
| } |
| 1006 |
|
| else RETVAL = xs::out(new DateRel(*THIS + sv2daterel(arg)), Object(ST(0)).stash()); |
| 1007 |
|
| #line 1008 "xs/main_xsgen.cc" |
| 1008 |
|
| { |
| 1009 |
|
| SV * RETVALSV; |
| 1010 |
20 |
| RETVALSV = NULL; |
| 1011 |
20 |
▶ | if (!RETVAL) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!RETVAL) XSRETURN_UNDEF; |
0 |
20 |
20 |
|
| 1012 |
20 |
▶ | if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
Branch: 2 branches
| Branch | True | False | Total |
| if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
20 |
0 |
20 |
| if (RETVAL.is_scalar()) RETVALSV = RETVAL.detach(); |
20 |
0 |
20 |
|
| 1013 |
0 |
| else switch (RETVAL.type()) { |
| 1014 |
0 |
▶ | case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get<AV>()).push_on_stack(MARK)); |
Branch: 2 branches
| Branch | True | False | Total |
| case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get<AV>()).push_on_stack(MARK)); |
0 |
0 |
0 |
| case SVt_PVAV: XSRETURN(xs::Array(RETVAL.get<AV>()).push_on_stack(MARK)); |
0 |
0 |
0 |
|
| 1015 |
0 |
▶ | case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get<HV>()).push_on_stack(MARK)); |
Branch: 2 branches
| Branch | True | False | Total |
| case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get<HV>()).push_on_stack(MARK)); |
0 |
0 |
0 |
| case SVt_PVHV: XSRETURN(xs::Hash(RETVAL.get<HV>()).push_on_stack(MARK)); |
0 |
0 |
0 |
|
| 1016 |
0 |
| case SVt_PVCV: |
| 1017 |
|
| case SVt_PVIO: |
| 1018 |
0 |
▶ | RETVALSV = newRV_noinc(RETVAL.detach()); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = newRV_noinc(RETVAL.detach()); |
0 |
0 |
0 |
|
| 1019 |
0 |
| break; |
| 1020 |
0 |
| default: throw "unknown type of Sv to return"; |
| 1021 |
|
| } |
| 1022 |
20 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
20 |
0 |
20 |
|
| 1023 |
20 |
| ST(0) = RETVALSV; |
| 1024 |
|
| } |
| 1025 |
20 |
▶ | } |
Branch: 2 branches
| Branch | True | False | Total |
| } |
20 |
0 |
20 |
| } |
20 |
0 |
20 |
|
| 1026 |
20 |
| XSRETURN(1); |
| 1027 |
20 |
| }); } |
| 1028 |
|
| |
| 1029 |
|
| |
| 1030 |
|
| |
| 1031 |
26 |
▶ | XS_EUPXS(XS_Date__Rel_add) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_add) { xs::throw_guard(cv, [=]() |
4 |
0 |
4 |
|
| 1032 |
|
| { |
| 1033 |
13 |
| dVAR; dXSARGS; |
| 1034 |
13 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
0 |
13 |
13 |
|
| 1035 |
0 |
| croak_xs_usage(cv, "THIS, arg, ..."); |
| 1036 |
|
| { |
| 1037 |
|
| SV * RETVAL; |
| 1038 |
13 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
5 |
8 |
13 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
5 |
5 |
|
| 1039 |
|
| ; |
| 1040 |
5 |
| Sv arg = ST(1) |
| 1041 |
|
| ; |
| 1042 |
|
| #line 170 "xs/DateRel.xsi" |
| 1043 |
|
| *THIS += sv2daterel(arg); |
| 1044 |
|
| XSRETURN(1); |
| 1045 |
|
| #line 1046 "xs/main_xsgen.cc" |
| 1046 |
|
| RETVAL = sv_2mortal(RETVAL); |
| 1047 |
|
| ST(0) = RETVAL; |
| 1048 |
5 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
0 |
4 |
4 |
|
| 1049 |
0 |
| XSRETURN(1); |
| 1050 |
4 |
| }); } |
| 1051 |
|
| |
| 1052 |
|
| |
| 1053 |
|
| |
| 1054 |
24 |
▶ | XS_EUPXS(XS_Date__Rel_difference) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_difference) { xs::throw_guard(cv, [=]() |
10 |
0 |
10 |
|
| 1055 |
|
| { |
| 1056 |
12 |
| dVAR; dXSARGS; |
| 1057 |
12 |
▶ | if (items < 2 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 2 || items > 3) |
12 |
0 |
12 |
| if (items < 2 || items > 3) |
0 |
12 |
12 |
|
| 1058 |
0 |
| croak_xs_usage(cv, "THIS, arg, reverse= false"); |
| 1059 |
|
| { |
| 1060 |
|
| DateRel * RETVAL; |
| 1061 |
12 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
12 |
0 |
12 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
12 |
12 |
|
| 1062 |
|
| ; |
| 1063 |
12 |
| Sv arg = ST(1) |
| 1064 |
|
| ; |
| 1065 |
|
| bool reverse; |
| 1066 |
|
| |
| 1067 |
12 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
0 |
12 |
12 |
|
| 1068 |
0 |
| reverse = false; |
| 1069 |
|
| else { |
| 1070 |
12 |
▶ | reverse = (bool)SvTRUE(ST(2)) |
Branch: 1 branch
| Branch | True | False | Total |
| reverse = (bool)SvTRUE(ST(2)) |
12 |
0 |
12 |
|
| 1071 |
|
| ; |
| 1072 |
|
| } |
| 1073 |
|
| #line 175 "xs/DateRel.xsi" |
| 1074 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1075 |
|
| auto op = sv2daterel(arg); |
| 1076 |
|
| RETVAL = new DateRel(reverse ? (op - *THIS) : (*THIS - op)); |
| 1077 |
|
| PROTO = Object(ST(0)).stash(); |
| 1078 |
|
| #line 1079 "xs/main_xsgen.cc" |
| 1079 |
|
| { |
| 1080 |
|
| SV * RETVALSV; |
| 1081 |
10 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
10 |
0 |
10 |
|
| 1082 |
10 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
10 |
0 |
10 |
|
| 1083 |
10 |
| ST(0) = RETVALSV; |
| 1084 |
|
| } |
| 1085 |
14 |
| } |
| 1086 |
10 |
| XSRETURN(1); |
| 1087 |
10 |
| }); } |
| 1088 |
|
| |
| 1089 |
|
| |
| 1090 |
|
| |
| 1091 |
32 |
▶ | XS_EUPXS(XS_Date__Rel_subtract) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_subtract) { xs::throw_guard(cv, [=]() |
6 |
0 |
6 |
|
| 1092 |
|
| { |
| 1093 |
16 |
| dVAR; dXSARGS; |
| 1094 |
16 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
0 |
16 |
16 |
|
| 1095 |
0 |
| croak_xs_usage(cv, "THIS, arg, ..."); |
| 1096 |
|
| { |
| 1097 |
|
| SV * RETVAL; |
| 1098 |
16 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
8 |
8 |
16 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
8 |
8 |
|
| 1099 |
|
| ; |
| 1100 |
8 |
| Sv arg = ST(1) |
| 1101 |
|
| ; |
| 1102 |
|
| #line 181 "xs/DateRel.xsi" |
| 1103 |
|
| *THIS -= sv2daterel(arg); |
| 1104 |
|
| XSRETURN(1); |
| 1105 |
|
| #line 1106 "xs/main_xsgen.cc" |
| 1106 |
|
| RETVAL = sv_2mortal(RETVAL); |
| 1107 |
|
| ST(0) = RETVAL; |
| 1108 |
8 |
▶ | } |
Branch: 1 branch
| Branch | True | False | Total |
| } |
0 |
6 |
6 |
|
| 1109 |
0 |
| XSRETURN(1); |
| 1110 |
6 |
| }); } |
| 1111 |
|
| |
| 1112 |
|
| |
| 1113 |
|
| |
| 1114 |
46 |
▶ | XS_EUPXS(XS_Date__Rel_product) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_product) { xs::throw_guard(cv, [=]() |
23 |
0 |
23 |
|
| 1115 |
|
| { |
| 1116 |
23 |
| dVAR; dXSARGS; |
| 1117 |
23 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
0 |
23 |
23 |
|
| 1118 |
0 |
| croak_xs_usage(cv, "THIS, arg, ..."); |
| 1119 |
|
| { |
| 1120 |
|
| DateRel * RETVAL; |
| 1121 |
23 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
23 |
0 |
23 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
23 |
23 |
|
| 1122 |
|
| ; |
| 1123 |
23 |
| SV* arg = ST(1) |
| 1124 |
|
| ; |
| 1125 |
|
| #line 186 "xs/DateRel.xsi" |
| 1126 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1127 |
|
| RETVAL = new DateRel(*THIS * SvNV(arg)); |
| 1128 |
|
| PROTO = Object(ST(0)).stash(); |
| 1129 |
|
| #line 1130 "xs/main_xsgen.cc" |
| 1130 |
|
| { |
| 1131 |
|
| SV * RETVALSV; |
| 1132 |
23 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
23 |
0 |
23 |
|
| 1133 |
23 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
23 |
0 |
23 |
|
| 1134 |
23 |
| ST(0) = RETVALSV; |
| 1135 |
|
| } |
| 1136 |
23 |
| } |
| 1137 |
23 |
| XSRETURN(1); |
| 1138 |
23 |
| }); } |
| 1139 |
|
| |
| 1140 |
|
| |
| 1141 |
|
| |
| 1142 |
20 |
▶ | XS_EUPXS(XS_Date__Rel_multiply) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_multiply) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 1143 |
|
| { |
| 1144 |
10 |
| dVAR; dXSARGS; |
| 1145 |
10 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
0 |
10 |
10 |
|
| 1146 |
0 |
| croak_xs_usage(cv, "THIS, arg, ..."); |
| 1147 |
|
| { |
| 1148 |
|
| SV * RETVAL; |
| 1149 |
10 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 1150 |
|
| ; |
| 1151 |
2 |
| SV* arg = ST(1) |
| 1152 |
|
| ; |
| 1153 |
|
| #line 191 "xs/DateRel.xsi" |
| 1154 |
|
| *THIS *= SvNV(arg); |
| 1155 |
|
| XSRETURN(1); |
| 1156 |
|
| #line 1157 "xs/main_xsgen.cc" |
| 1157 |
|
| RETVAL = sv_2mortal(RETVAL); |
| 1158 |
|
| ST(0) = RETVAL; |
| 1159 |
|
| } |
| 1160 |
|
| XSRETURN(1); |
| 1161 |
2 |
| }); } |
| 1162 |
|
| |
| 1163 |
|
| |
| 1164 |
|
| |
| 1165 |
30 |
▶ | XS_EUPXS(XS_Date__Rel_quotient) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_quotient) { xs::throw_guard(cv, [=]() |
9 |
0 |
9 |
|
| 1166 |
|
| { |
| 1167 |
15 |
| dVAR; dXSARGS; |
| 1168 |
15 |
▶ | if (items < 2 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 2 || items > 3) |
15 |
0 |
15 |
| if (items < 2 || items > 3) |
0 |
15 |
15 |
|
| 1169 |
0 |
| croak_xs_usage(cv, "THIS, arg, reverse= false"); |
| 1170 |
|
| { |
| 1171 |
|
| DateRel * RETVAL; |
| 1172 |
15 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
15 |
0 |
15 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
15 |
15 |
|
| 1173 |
|
| ; |
| 1174 |
15 |
| SV* arg = ST(1) |
| 1175 |
|
| ; |
| 1176 |
|
| bool reverse; |
| 1177 |
|
| |
| 1178 |
15 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
0 |
15 |
15 |
|
| 1179 |
0 |
| reverse = false; |
| 1180 |
|
| else { |
| 1181 |
15 |
▶ | reverse = (bool)SvTRUE(ST(2)) |
Branch: 1 branch
| Branch | True | False | Total |
| reverse = (bool)SvTRUE(ST(2)) |
15 |
0 |
15 |
|
| 1182 |
|
| ; |
| 1183 |
|
| } |
| 1184 |
|
| #line 196 "xs/DateRel.xsi" |
| 1185 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1186 |
|
| if (reverse) throw "Date: illegal divison $num/$reldate"; |
| 1187 |
|
| RETVAL = new DateRel(*THIS / SvNV(arg)); |
| 1188 |
|
| PROTO = Object(ST(0)).stash(); |
| 1189 |
|
| #line 1190 "xs/main_xsgen.cc" |
| 1190 |
|
| { |
| 1191 |
|
| SV * RETVALSV; |
| 1192 |
9 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
9 |
0 |
9 |
|
| 1193 |
9 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
9 |
0 |
9 |
|
| 1194 |
9 |
| ST(0) = RETVALSV; |
| 1195 |
|
| } |
| 1196 |
15 |
| } |
| 1197 |
9 |
| XSRETURN(1); |
| 1198 |
9 |
| }); } |
| 1199 |
|
| |
| 1200 |
|
| |
| 1201 |
|
| |
| 1202 |
20 |
▶ | XS_EUPXS(XS_Date__Rel_divide) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_divide) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 1203 |
|
| { |
| 1204 |
10 |
| dVAR; dXSARGS; |
| 1205 |
10 |
▶ | if (items < 2 || items > 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (items < 2 || items > 3) |
10 |
0 |
10 |
| if (items < 2 || items > 3) |
0 |
10 |
10 |
|
| 1206 |
0 |
| croak_xs_usage(cv, "THIS, arg, reverse= false"); |
| 1207 |
|
| { |
| 1208 |
|
| SV * RETVAL; |
| 1209 |
10 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 1210 |
|
| ; |
| 1211 |
2 |
| SV* arg = ST(1) |
| 1212 |
|
| ; |
| 1213 |
|
| bool reverse; |
| 1214 |
|
| |
| 1215 |
2 |
▶ | if (items < 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 3) |
0 |
2 |
2 |
|
| 1216 |
0 |
| reverse = false; |
| 1217 |
|
| else { |
| 1218 |
2 |
| reverse = (bool)SvTRUE(ST(2)) |
| 1219 |
|
| ; |
| 1220 |
|
| } |
| 1221 |
|
| #line 202 "xs/DateRel.xsi" |
| 1222 |
|
| if (reverse) throw "Date: illegal divison $num/$reldate"; |
| 1223 |
|
| *THIS /= SvNV(arg); |
| 1224 |
|
| XSRETURN(1); |
| 1225 |
|
| #line 1226 "xs/main_xsgen.cc" |
| 1226 |
|
| RETVAL = sv_2mortal(RETVAL); |
| 1227 |
|
| ST(0) = RETVAL; |
| 1228 |
|
| } |
| 1229 |
|
| XSRETURN(1); |
| 1230 |
2 |
| }); } |
| 1231 |
|
| |
| 1232 |
|
| |
| 1233 |
|
| |
| 1234 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_negated) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_negated) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 1235 |
|
| { |
| 1236 |
2 |
| dVAR; dXSARGS; |
| 1237 |
2 |
▶ | if (items < 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 1) |
0 |
2 |
2 |
|
| 1238 |
0 |
| croak_xs_usage(cv, "THIS, ..."); |
| 1239 |
|
| { |
| 1240 |
|
| DateRel * RETVAL; |
| 1241 |
2 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
2 |
0 |
2 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 1242 |
|
| ; |
| 1243 |
|
| #line 208 "xs/DateRel.xsi" |
| 1244 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1245 |
|
| RETVAL = new DateRel(THIS->negated()); |
| 1246 |
|
| PROTO = Object(ST(0)).stash(); |
| 1247 |
|
| #line 1248 "xs/main_xsgen.cc" |
| 1248 |
|
| { |
| 1249 |
|
| SV * RETVALSV; |
| 1250 |
2 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
2 |
0 |
2 |
|
| 1251 |
2 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
2 |
0 |
2 |
|
| 1252 |
2 |
| ST(0) = RETVALSV; |
| 1253 |
|
| } |
| 1254 |
2 |
| } |
| 1255 |
2 |
| XSRETURN(1); |
| 1256 |
2 |
| }); } |
| 1257 |
|
| |
| 1258 |
|
| |
| 1259 |
|
| |
| 1260 |
16 |
▶ | XS_EUPXS(XS_Date__Rel_negate) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_negate) { xs::throw_guard(cv, [=]() |
0 |
0 |
0 |
|
| 1261 |
|
| { |
| 1262 |
8 |
| dVAR; dXSARGS; |
| 1263 |
8 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
8 |
8 |
|
| 1264 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1265 |
|
| { |
| 1266 |
|
| SV * RETVAL; |
| 1267 |
8 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
|
| 1268 |
|
| ; |
| 1269 |
|
| #line 213 "xs/DateRel.xsi" |
| 1270 |
|
| THIS->negate(); |
| 1271 |
|
| XSRETURN(1); |
| 1272 |
|
| #line 1273 "xs/main_xsgen.cc" |
| 1273 |
|
| RETVAL = sv_2mortal(RETVAL); |
| 1274 |
|
| ST(0) = RETVAL; |
| 1275 |
|
| } |
| 1276 |
|
| XSRETURN(1); |
| 1277 |
0 |
| }); } |
| 1278 |
|
| |
| 1279 |
|
| |
| 1280 |
|
| |
| 1281 |
52 |
▶ | XS_EUPXS(XS_Date__Rel_compare) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_compare) { xs::throw_guard(cv, [=]() |
25 |
0 |
25 |
|
| 1282 |
|
| { |
| 1283 |
26 |
| dVAR; dXSARGS; |
| 1284 |
26 |
▶ | if (items != 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 3) |
0 |
26 |
26 |
|
| 1285 |
0 |
| croak_xs_usage(cv, "THIS, arg, reverse"); |
| 1286 |
|
| { |
| 1287 |
|
| int RETVAL; |
| 1288 |
26 |
▶ | dXSTARG; |
Branch: 2 branches
| Branch | True | False | Total |
| dXSTARG; |
0 |
26 |
26 |
| dXSTARG; |
26 |
0 |
26 |
|
| 1289 |
26 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
26 |
0 |
26 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
26 |
26 |
|
| 1290 |
|
| ; |
| 1291 |
26 |
| Sv arg = ST(1) |
| 1292 |
|
| ; |
| 1293 |
26 |
▶ | bool reverse = (bool)SvTRUE(ST(2)) |
Branch: 2 branches
| Branch | True | False | Total |
| bool reverse = (bool)SvTRUE(ST(2)) |
26 |
0 |
26 |
| bool reverse = (bool)SvTRUE(ST(2)) |
25 |
1 |
26 |
|
| 1294 |
|
| ; |
| 1295 |
|
| #line 218 "xs/DateRel.xsi" |
| 1296 |
|
| RETVAL = THIS->compare(sv2daterel(arg)); |
| 1297 |
|
| if (reverse) RETVAL = -RETVAL; |
| 1298 |
|
| if (RETVAL < 0) RETVAL = -1; |
| 1299 |
|
| else if (RETVAL > 0) RETVAL = 1; |
| 1300 |
|
| #line 1301 "xs/main_xsgen.cc" |
| 1301 |
25 |
▶ | TARGi((IV)RETVAL, 1); |
Branch: 2 branches
| Branch | True | False | Total |
| TARGi((IV)RETVAL, 1); |
0 |
25 |
25 |
| TARGi((IV)RETVAL, 1); |
25 |
0 |
25 |
|
| 1302 |
25 |
| ST(0) = TARG; |
| 1303 |
26 |
| } |
| 1304 |
25 |
| XSRETURN(1); |
| 1305 |
25 |
| }); } |
| 1306 |
|
| |
| 1307 |
|
| |
| 1308 |
|
| |
| 1309 |
184 |
▶ | XS_EUPXS(XS_Date__Rel_is_same) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_is_same) { xs::throw_guard(cv, [=]() |
91 |
0 |
91 |
|
| 1310 |
|
| { |
| 1311 |
92 |
| dVAR; dXSARGS; |
| 1312 |
92 |
▶ | if (items < 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items < 2) |
0 |
92 |
92 |
|
| 1313 |
0 |
| croak_xs_usage(cv, "THIS, arg, ..."); |
| 1314 |
|
| { |
| 1315 |
|
| bool RETVAL; |
| 1316 |
92 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
92 |
0 |
92 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
92 |
92 |
|
| 1317 |
|
| ; |
| 1318 |
92 |
| Sv arg = ST(1) |
| 1319 |
|
| ; |
| 1320 |
|
| #line 225 "xs/DateRel.xsi" |
| 1321 |
|
| RETVAL = THIS->is_same(sv2daterel(arg)); |
| 1322 |
|
| #line 1323 "xs/main_xsgen.cc" |
| 1323 |
91 |
▶ | ST(0) = boolSV(RETVAL); |
Branch: 1 branch
| Branch | True | False | Total |
| ST(0) = boolSV(RETVAL); |
91 |
0 |
91 |
|
| 1324 |
92 |
| } |
| 1325 |
91 |
| XSRETURN(1); |
| 1326 |
91 |
| }); } |
| 1327 |
|
| |
| 1328 |
|
| |
| 1329 |
|
| |
| 1330 |
12 |
▶ | XS_EUPXS(XS_Date__Rel_includes) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_includes) { xs::throw_guard(cv, [=]() |
6 |
0 |
6 |
|
| 1331 |
|
| { |
| 1332 |
6 |
| dVAR; dXSARGS; |
| 1333 |
6 |
▶ | if (items != 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 2) |
0 |
6 |
6 |
|
| 1334 |
0 |
| croak_xs_usage(cv, "THIS, arg"); |
| 1335 |
|
| { |
| 1336 |
|
| int RETVAL; |
| 1337 |
6 |
▶ | dXSTARG; |
Branch: 2 branches
| Branch | True | False | Total |
| dXSTARG; |
6 |
0 |
6 |
| dXSTARG; |
0 |
0 |
0 |
|
| 1338 |
6 |
▶ | const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
6 |
0 |
6 |
| const DateRel* THIS = xs::in<const DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
6 |
6 |
|
| 1339 |
|
| ; |
| 1340 |
6 |
| Sv arg = ST(1) |
| 1341 |
|
| ; |
| 1342 |
|
| #line 229 "xs/DateRel.xsi" |
| 1343 |
|
| RETVAL = THIS->includes(sv2date(arg)); |
| 1344 |
|
| #line 1345 "xs/main_xsgen.cc" |
| 1345 |
6 |
▶ | TARGi((IV)RETVAL, 1); |
Branch: 2 branches
| Branch | True | False | Total |
| TARGi((IV)RETVAL, 1); |
0 |
6 |
6 |
| TARGi((IV)RETVAL, 1); |
6 |
0 |
6 |
|
| 1346 |
6 |
| ST(0) = TARG; |
| 1347 |
6 |
| } |
| 1348 |
6 |
| XSRETURN(1); |
| 1349 |
6 |
| }); } |
| 1350 |
|
| |
| 1351 |
|
| |
| 1352 |
|
| |
| 1353 |
4 |
▶ | XS_EUPXS(XS_Date__Rel_clone) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_clone) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 1354 |
|
| { |
| 1355 |
2 |
| dVAR; dXSARGS; |
| 1356 |
2 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
2 |
2 |
|
| 1357 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1358 |
|
| { |
| 1359 |
|
| DateRel * RETVAL; |
| 1360 |
2 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
2 |
0 |
2 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 1361 |
|
| ; |
| 1362 |
|
| #line 233 "xs/DateRel.xsi" |
| 1363 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1364 |
|
| RETVAL = new DateRel(*THIS); |
| 1365 |
|
| PROTO = Object(ST(0)).stash(); |
| 1366 |
|
| #line 1367 "xs/main_xsgen.cc" |
| 1367 |
|
| { |
| 1368 |
|
| SV * RETVALSV; |
| 1369 |
2 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
2 |
0 |
2 |
|
| 1370 |
2 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
2 |
0 |
2 |
|
| 1371 |
2 |
| ST(0) = RETVALSV; |
| 1372 |
|
| } |
| 1373 |
2 |
| } |
| 1374 |
2 |
| XSRETURN(1); |
| 1375 |
2 |
| }); } |
| 1376 |
|
| |
| 1377 |
|
| |
| 1378 |
|
| /* INCLUDE: Returning to 'main.xs' from 'DateRel.xsi' */ |
| 1379 |
|
| |
| 1380 |
|
| |
| 1381 |
|
| /* INCLUDE: Including 'serialize.xsi' from 'main.xs' */ |
| 1382 |
|
| |
| 1383 |
|
| #include <cstring> |
| 1384 |
5 |
| static inline size_t date_freeze_len (const Date& date) { |
| 1385 |
5 |
▶ | if (date.timezone()->is_local) return sizeof(ptime_t); |
Branch: 1 branch
| Branch | True | False | Total |
| if (date.timezone()->is_local) return sizeof(ptime_t); |
4 |
1 |
5 |
|
| 1386 |
1 |
| return sizeof(ptime_t) + date.timezone()->name.length(); |
| 1387 |
|
| } |
| 1388 |
5 |
| static inline void date_freeze (const Date& date, char* buf) { |
| 1389 |
5 |
| if (sizeof(ptime_t) == 8) *((ptime_t*)buf) = panda::h2be64(date.epoch()); |
| 1390 |
|
| else *((ptime_t*)buf) = panda::h2be32(date.epoch()); |
| 1391 |
5 |
| buf += sizeof(ptime_t); |
| 1392 |
|
| |
| 1393 |
5 |
▶ | if (date.timezone()->is_local) *buf = 0; |
Branch: 1 branch
| Branch | True | False | Total |
| if (date.timezone()->is_local) *buf = 0; |
4 |
1 |
5 |
|
| 1394 |
|
| else { |
| 1395 |
1 |
| auto len = date.timezone()->name.length(); |
| 1396 |
1 |
| std::memcpy(buf, date.timezone()->name.data(), len); |
| 1397 |
1 |
| buf[len] = 0; |
| 1398 |
|
| } |
| 1399 |
5 |
| } |
| 1400 |
5 |
| static inline const char* date_thaw (ptime_t* epoch, const Timezone** zone, const char* ptr, size_t len) { |
| 1401 |
5 |
▶ | if (len < sizeof(ptime_t)) throw "Date: cannot 'thaw' - corrupted data"; |
Branch: 1 branch
| Branch | True | False | Total |
| if (len < sizeof(ptime_t)) throw "Date: cannot 'thaw' - corrupted data"; |
0 |
5 |
5 |
|
| 1402 |
5 |
| if (sizeof(ptime_t) == 8) *epoch = panda::be2h64(*((ptime_t*)ptr)); |
| 1403 |
|
| else *epoch = panda::be2h32(*((ptime_t*)ptr)); |
| 1404 |
5 |
| ptr += sizeof(ptime_t); |
| 1405 |
5 |
▶ | if (*ptr == 0) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (*ptr == 0) { |
4 |
1 |
5 |
|
| 1406 |
4 |
| *zone = NULL; |
| 1407 |
4 |
| return ptr; |
| 1408 |
|
| } |
| 1409 |
1 |
| size_t znlen = strlen(ptr); |
| 1410 |
1 |
▶ | if (znlen) *zone = tzget(ptr); |
Branch: 2 branches
| Branch | True | False | Total |
| if (znlen) *zone = tzget(ptr); |
1 |
0 |
1 |
| if (znlen) *zone = tzget(ptr); |
1 |
0 |
1 |
|
| 1411 |
1 |
| return ptr + znlen; |
| 1412 |
|
| } |
| 1413 |
|
| |
| 1414 |
|
| |
| 1415 |
0 |
▶ | XS_EUPXS(XS_Date_HOOK_CLONE) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_HOOK_CLONE) { xs::throw_guard(cv, [=]() |
0 |
0 |
0 |
|
| 1416 |
|
| { |
| 1417 |
0 |
| dVAR; dXSARGS; |
| 1418 |
0 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
0 |
0 |
|
| 1419 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1420 |
|
| { |
| 1421 |
|
| Date * RETVAL; |
| 1422 |
0 |
▶ | Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
| Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
|
| 1423 |
|
| ; |
| 1424 |
|
| #line 40 "xs/serialize.xsi" |
| 1425 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1426 |
|
| RETVAL = new Date(*THIS); |
| 1427 |
|
| PROTO = Object(ST(0)).stash(); |
| 1428 |
|
| #line 1429 "xs/main_xsgen.cc" |
| 1429 |
|
| { |
| 1430 |
|
| SV * RETVALSV; |
| 1431 |
0 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
0 |
0 |
0 |
|
| 1432 |
0 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
0 |
0 |
0 |
|
| 1433 |
0 |
| ST(0) = RETVALSV; |
| 1434 |
|
| } |
| 1435 |
0 |
| } |
| 1436 |
0 |
| XSRETURN(1); |
| 1437 |
0 |
| }); } |
| 1438 |
|
| |
| 1439 |
|
| |
| 1440 |
|
| |
| 1441 |
10 |
▶ | XS_EUPXS(XS_Date_STORABLE_freeze) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_STORABLE_freeze) { xs::throw_guard(cv, [=]() |
5 |
0 |
5 |
|
| 1442 |
|
| { |
| 1443 |
5 |
| dVAR; dXSARGS; |
| 1444 |
5 |
▶ | if (items != 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 2) |
0 |
5 |
5 |
|
| 1445 |
0 |
| croak_xs_usage(cv, "THIS, _____unused4"); |
| 1446 |
|
| { |
| 1447 |
|
| SV * RETVAL; |
| 1448 |
5 |
▶ | Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
5 |
5 |
|
| 1449 |
|
| ; |
| 1450 |
|
| #line 45 "xs/serialize.xsi" |
| 1451 |
|
| size_t len = date_freeze_len(*THIS); |
| 1452 |
|
| RETVAL = newSV(len); |
| 1453 |
|
| SvPOK_on(RETVAL); |
| 1454 |
|
| char* buf = SvPVX(RETVAL); |
| 1455 |
|
| date_freeze(*THIS, buf); |
| 1456 |
|
| SvCUR_set(RETVAL, len); |
| 1457 |
|
| #line 1458 "xs/main_xsgen.cc" |
| 1458 |
5 |
| RETVAL = sv_2mortal(RETVAL); |
| 1459 |
5 |
| ST(0) = RETVAL; |
| 1460 |
|
| } |
| 1461 |
5 |
| XSRETURN(1); |
| 1462 |
5 |
| }); } |
| 1463 |
|
| |
| 1464 |
|
| |
| 1465 |
|
| |
| 1466 |
10 |
▶ | XS_EUPXS(XS_Date_STORABLE_attach) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_STORABLE_attach) { xs::throw_guard(cv, [=]() |
5 |
0 |
5 |
|
| 1467 |
|
| { |
| 1468 |
5 |
| dVAR; dXSARGS; |
| 1469 |
5 |
▶ | if (items != 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 3) |
0 |
5 |
5 |
|
| 1470 |
0 |
| croak_xs_usage(cv, "CLASS, _____unused5, serialized"); |
| 1471 |
|
| { |
| 1472 |
|
| Date * RETVAL; |
| 1473 |
5 |
| SV* CLASS = ST(0) |
| 1474 |
|
| ; |
| 1475 |
5 |
| SV* serialized = ST(2) |
| 1476 |
|
| ; |
| 1477 |
|
| #line 54 "xs/serialize.xsi" |
| 1478 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1479 |
|
| STRLEN len; |
| 1480 |
|
| const char* str = SvPV(serialized, len); |
| 1481 |
|
| ptime_t epoch; |
| 1482 |
|
| const Timezone* zone = nullptr; |
| 1483 |
|
| date_thaw(&epoch, &zone, str, len); |
| 1484 |
|
| RETVAL = new Date(epoch, zone); |
| 1485 |
|
| PROTO = CLASS; |
| 1486 |
|
| #line 1487 "xs/main_xsgen.cc" |
| 1487 |
|
| { |
| 1488 |
|
| SV * RETVALSV; |
| 1489 |
5 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
5 |
0 |
5 |
|
| 1490 |
5 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
5 |
0 |
5 |
|
| 1491 |
5 |
| ST(0) = RETVALSV; |
| 1492 |
|
| } |
| 1493 |
5 |
| } |
| 1494 |
5 |
| XSRETURN(1); |
| 1495 |
5 |
| }); } |
| 1496 |
|
| |
| 1497 |
|
| |
| 1498 |
|
| |
| 1499 |
0 |
▶ | XS_EUPXS(XS_Date_TO_JSON) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date_TO_JSON) { xs::throw_guard(cv, [=]() |
0 |
0 |
0 |
|
| 1500 |
|
| { |
| 1501 |
0 |
| dVAR; dXSARGS; |
| 1502 |
0 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
0 |
0 |
|
| 1503 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1504 |
|
| { |
| 1505 |
|
| ptime_t RETVAL; |
| 1506 |
0 |
▶ | Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
| Date* THIS = xs::in<Date *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
|
| 1507 |
|
| ; |
| 1508 |
|
| #line 64 "xs/serialize.xsi" |
| 1509 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1510 |
|
| RETVAL = THIS->epoch(); |
| 1511 |
|
| #line 1512 "xs/main_xsgen.cc" |
| 1512 |
|
| { |
| 1513 |
|
| SV * RETVALSV; |
| 1514 |
0 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
0 |
0 |
0 |
|
| 1515 |
0 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
0 |
0 |
0 |
|
| 1516 |
0 |
| ST(0) = RETVALSV; |
| 1517 |
|
| } |
| 1518 |
0 |
| } |
| 1519 |
0 |
| XSRETURN(1); |
| 1520 |
0 |
| }); } |
| 1521 |
|
| |
| 1522 |
|
| |
| 1523 |
|
| |
| 1524 |
0 |
▶ | XS_EUPXS(XS_Date__Rel_HOOK_CLONE) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_HOOK_CLONE) { xs::throw_guard(cv, [=]() |
0 |
0 |
0 |
|
| 1525 |
|
| { |
| 1526 |
0 |
| dVAR; dXSARGS; |
| 1527 |
0 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
0 |
0 |
|
| 1528 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1529 |
|
| { |
| 1530 |
|
| DateRel * RETVAL; |
| 1531 |
0 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
0 |
0 |
|
| 1532 |
|
| ; |
| 1533 |
|
| #line 71 "xs/serialize.xsi" |
| 1534 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1535 |
|
| RETVAL = new DateRel(*THIS); |
| 1536 |
|
| PROTO = Object(ST(0)).stash(); |
| 1537 |
|
| #line 1538 "xs/main_xsgen.cc" |
| 1538 |
|
| { |
| 1539 |
|
| SV * RETVALSV; |
| 1540 |
0 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
0 |
0 |
0 |
|
| 1541 |
0 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
0 |
0 |
0 |
|
| 1542 |
0 |
| ST(0) = RETVALSV; |
| 1543 |
|
| } |
| 1544 |
0 |
| } |
| 1545 |
0 |
| XSRETURN(1); |
| 1546 |
0 |
| }); } |
| 1547 |
|
| |
| 1548 |
|
| |
| 1549 |
|
| |
| 1550 |
8 |
▶ | XS_EUPXS(XS_Date__Rel_STORABLE_freeze) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_STORABLE_freeze) { xs::throw_guard(cv, [=]() |
4 |
0 |
4 |
|
| 1551 |
|
| { |
| 1552 |
4 |
| dVAR; dXSARGS; |
| 1553 |
4 |
▶ | if (items != 2) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 2) |
0 |
4 |
4 |
|
| 1554 |
0 |
| croak_xs_usage(cv, "THIS, _____unused6"); |
| 1555 |
|
| { |
| 1556 |
4 |
| string RETVAL; |
| 1557 |
4 |
▶ | dXSTARG; |
Branch: 2 branches
| Branch | True | False | Total |
| dXSTARG; |
0 |
4 |
4 |
| dXSTARG; |
4 |
0 |
4 |
|
| 1558 |
4 |
▶ | DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
4 |
0 |
4 |
| DateRel* THIS = xs::in<DateRel *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
4 |
4 |
|
| 1559 |
|
| ; |
| 1560 |
|
| #line 76 "xs/serialize.xsi" |
| 1561 |
|
| RETVAL = THIS->from() ? THIS->to_string(DateRel::Format::iso8601i) : THIS->to_string(); |
| 1562 |
|
| #line 1563 "xs/main_xsgen.cc" |
| 1563 |
4 |
▶ | sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
Branch: 1 branch
| Branch | True | False | Total |
| sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
4 |
0 |
4 |
|
| 1564 |
4 |
| ST(0) = TARG; |
| 1565 |
4 |
| } |
| 1566 |
4 |
| XSRETURN(1); |
| 1567 |
4 |
| }); } |
| 1568 |
|
| |
| 1569 |
|
| |
| 1570 |
|
| |
| 1571 |
8 |
▶ | XS_EUPXS(XS_Date__Rel_STORABLE_attach) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Rel_STORABLE_attach) { xs::throw_guard(cv, [=]() |
4 |
0 |
4 |
|
| 1572 |
|
| { |
| 1573 |
4 |
| dVAR; dXSARGS; |
| 1574 |
4 |
▶ | if (items != 3) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 3) |
0 |
4 |
4 |
|
| 1575 |
0 |
| croak_xs_usage(cv, "CLASS, _____unused7, serialized"); |
| 1576 |
|
| { |
| 1577 |
|
| DateRel * RETVAL; |
| 1578 |
4 |
| SV* CLASS = ST(0) |
| 1579 |
|
| ; |
| 1580 |
4 |
| string_view serialized; |
| 1581 |
|
| |
| 1582 |
|
| { STRLEN __serialized_len; |
| 1583 |
4 |
| const char* __serialized_buf = SvPV(ST(2), __serialized_len); |
| 1584 |
4 |
| serialized = decltype(serialized)(__serialized_buf, __serialized_len); } |
| 1585 |
|
| ; |
| 1586 |
|
| #line 80 "xs/serialize.xsi" |
| 1587 |
|
| xs::Sv PROTO; PERL_UNUSED_VAR(PROTO); |
| 1588 |
|
| RETVAL = new DateRel(serialized); |
| 1589 |
|
| PROTO = CLASS; |
| 1590 |
|
| #line 1591 "xs/main_xsgen.cc" |
| 1591 |
|
| { |
| 1592 |
|
| SV * RETVALSV; |
| 1593 |
4 |
▶ | RETVALSV = xs::out(RETVAL, PROTO).detach(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = xs::out(RETVAL, PROTO).detach(); |
4 |
0 |
4 |
|
| 1594 |
4 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
4 |
0 |
4 |
|
| 1595 |
4 |
| ST(0) = RETVALSV; |
| 1596 |
|
| } |
| 1597 |
4 |
| } |
| 1598 |
4 |
| XSRETURN(1); |
| 1599 |
4 |
| }); } |
| 1600 |
|
| |
| 1601 |
|
| |
| 1602 |
|
| /* INCLUDE: Returning to 'main.xs' from 'serialize.xsi' */ |
| 1603 |
|
| |
| 1604 |
|
| |
| 1605 |
|
| /* INCLUDE: Including 'Timezone.xsi' from 'main.xs' */ |
| 1606 |
|
| |
| 1607 |
162 |
| static inline Hash export_transition (const Timezone::Transition& trans, bool is_past) { |
| 1608 |
162 |
| auto hash = Hash::create(); |
| 1609 |
162 |
▶ | hash.store("offset", Simple(trans.offset)); |
Branch: 2 branches
| Branch | True | False | Total |
| hash.store("offset", Simple(trans.offset)); |
162 |
0 |
162 |
| hash.store("offset", Simple(trans.offset)); |
162 |
0 |
162 |
|
| 1610 |
162 |
▶ | hash.store("abbrev", Simple(trans.abbrev)); |
Branch: 2 branches
| Branch | True | False | Total |
| hash.store("abbrev", Simple(trans.abbrev)); |
162 |
0 |
162 |
| hash.store("abbrev", Simple(trans.abbrev)); |
162 |
0 |
162 |
|
| 1611 |
162 |
▶ | if (!is_past) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (!is_past) { |
160 |
2 |
162 |
|
| 1612 |
160 |
▶ | hash.store("start", Simple(trans.start)); |
Branch: 2 branches
| Branch | True | False | Total |
| hash.store("start", Simple(trans.start)); |
160 |
0 |
160 |
| hash.store("start", Simple(trans.start)); |
160 |
0 |
160 |
|
| 1613 |
160 |
▶ | hash.store("isdst", Simple(trans.isdst)); |
Branch: 2 branches
| Branch | True | False | Total |
| hash.store("isdst", Simple(trans.isdst)); |
160 |
0 |
160 |
| hash.store("isdst", Simple(trans.isdst)); |
160 |
0 |
160 |
|
| 1614 |
160 |
▶ | hash.store("gmt_offset", Simple(trans.gmt_offset)); |
Branch: 2 branches
| Branch | True | False | Total |
| hash.store("gmt_offset", Simple(trans.gmt_offset)); |
160 |
0 |
160 |
| hash.store("gmt_offset", Simple(trans.gmt_offset)); |
160 |
0 |
160 |
|
| 1615 |
160 |
▶ | hash.store("leap_corr", Simple(trans.leap_corr)); |
Branch: 2 branches
| Branch | True | False | Total |
| hash.store("leap_corr", Simple(trans.leap_corr)); |
160 |
0 |
160 |
| hash.store("leap_corr", Simple(trans.leap_corr)); |
160 |
0 |
160 |
|
| 1616 |
160 |
▶ | hash.store("leap_delta", Simple(trans.leap_delta)); |
Branch: 2 branches
| Branch | True | False | Total |
| hash.store("leap_delta", Simple(trans.leap_delta)); |
160 |
0 |
160 |
| hash.store("leap_delta", Simple(trans.leap_delta)); |
160 |
0 |
160 |
|
| 1617 |
|
| } |
| 1618 |
162 |
| return hash; |
| 1619 |
|
| } |
| 1620 |
|
| |
| 1621 |
|
| |
| 1622 |
28 |
▶ | XS_EUPXS(XS_Date__Timezone_name) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Timezone_name) { xs::throw_guard(cv, [=]() |
14 |
0 |
14 |
|
| 1623 |
|
| { |
| 1624 |
14 |
| dVAR; dXSARGS; |
| 1625 |
14 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
14 |
14 |
|
| 1626 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1627 |
|
| { |
| 1628 |
14 |
| string RETVAL; |
| 1629 |
14 |
▶ | dXSTARG; |
Branch: 2 branches
| Branch | True | False | Total |
| dXSTARG; |
14 |
0 |
14 |
| dXSTARG; |
0 |
0 |
0 |
|
| 1630 |
14 |
▶ | const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
14 |
0 |
14 |
| const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
14 |
14 |
|
| 1631 |
|
| ; |
| 1632 |
|
| #line 21 "xs/Timezone.xsi" |
| 1633 |
|
| RETVAL = THIS->name; |
| 1634 |
|
| #line 1635 "xs/main_xsgen.cc" |
| 1635 |
14 |
▶ | sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
Branch: 1 branch
| Branch | True | False | Total |
| sv_setpvn((SV*)TARG, RETVAL.data(), RETVAL.length()); |
14 |
0 |
14 |
|
| 1636 |
14 |
| ST(0) = TARG; |
| 1637 |
14 |
| } |
| 1638 |
14 |
| XSRETURN(1); |
| 1639 |
14 |
| }); } |
| 1640 |
|
| |
| 1641 |
|
| |
| 1642 |
|
| |
| 1643 |
24 |
▶ | XS_EUPXS(XS_Date__Timezone_is_local) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Timezone_is_local) { xs::throw_guard(cv, [=]() |
12 |
0 |
12 |
|
| 1644 |
|
| { |
| 1645 |
12 |
| dVAR; dXSARGS; |
| 1646 |
12 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
12 |
12 |
|
| 1647 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1648 |
|
| { |
| 1649 |
|
| bool RETVAL; |
| 1650 |
12 |
▶ | const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 1 branch
| Branch | True | False | Total |
| const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
12 |
12 |
|
| 1651 |
|
| ; |
| 1652 |
|
| #line 25 "xs/Timezone.xsi" |
| 1653 |
|
| RETVAL = THIS->is_local; |
| 1654 |
|
| #line 1655 "xs/main_xsgen.cc" |
| 1655 |
12 |
▶ | ST(0) = boolSV(RETVAL); |
Branch: 1 branch
| Branch | True | False | Total |
| ST(0) = boolSV(RETVAL); |
12 |
0 |
12 |
|
| 1656 |
|
| } |
| 1657 |
12 |
| XSRETURN(1); |
| 1658 |
12 |
| }); } |
| 1659 |
|
| |
| 1660 |
|
| |
| 1661 |
|
| |
| 1662 |
4 |
▶ | XS_EUPXS(XS_Date__Timezone_export) { xs::throw_guard(cv, [=]() |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EUPXS(XS_Date__Timezone_export) { xs::throw_guard(cv, [=]() |
2 |
0 |
2 |
|
| 1663 |
|
| { |
| 1664 |
2 |
| dVAR; dXSARGS; |
| 1665 |
2 |
▶ | if (items != 1) |
Branch: 1 branch
| Branch | True | False | Total |
| if (items != 1) |
0 |
2 |
2 |
|
| 1666 |
0 |
| croak_xs_usage(cv, "THIS"); |
| 1667 |
|
| { |
| 1668 |
2 |
| Hash RETVAL; |
| 1669 |
2 |
▶ | const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
Branch: 2 branches
| Branch | True | False | Total |
| const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
2 |
0 |
2 |
| const Timezone* THIS = xs::in<const Timezone *>(ST(0)); if (!SvOK(ST(0))) throw "undef not allowed as THIS"; |
0 |
2 |
2 |
|
| 1670 |
|
| ; |
| 1671 |
|
| #line 29 "xs/Timezone.xsi" |
| 1672 |
|
| RETVAL = Hash::create(); |
| 1673 |
|
| |
| 1674 |
|
| RETVAL.store("name", Simple(string_view(THIS->name.data(), THIS->name.length()))); |
| 1675 |
|
| RETVAL.store("is_local", Simple(THIS->is_local ? 1 : 0)); |
| 1676 |
|
| |
| 1677 |
|
| auto future = Hash::create(); |
| 1678 |
|
| future.store("hasdst", Simple(THIS->future.hasdst ? 1 : 0)); |
| 1679 |
|
| |
| 1680 |
|
| auto outer = Hash::create(); |
| 1681 |
|
| outer.store("abbrev", Simple(string_view(THIS->future.outer.abbrev, strlen(THIS->future.outer.abbrev)))); |
| 1682 |
|
| outer.store("offset", Simple(THIS->future.outer.offset)); |
| 1683 |
|
| outer.store("gmt_offset", Simple(THIS->future.outer.gmt_offset)); |
| 1684 |
|
| outer.store("isdst", Simple(THIS->future.outer.isdst)); |
| 1685 |
|
| future.store("outer", Ref::create(outer)); |
| 1686 |
|
| |
| 1687 |
|
| if (THIS->future.hasdst) { |
| 1688 |
|
| auto outer_end = Hash::create(); |
| 1689 |
|
| outer_end.store("mon", Simple(THIS->future.outer.end.mon)); |
| 1690 |
|
| outer_end.store("week", Simple(THIS->future.outer.end.yday)); |
| 1691 |
|
| outer_end.store("day", Simple(THIS->future.outer.end.wday)); |
| 1692 |
|
| outer_end.store("hour", Simple(THIS->future.outer.end.hour)); |
| 1693 |
|
| outer_end.store("min", Simple(THIS->future.outer.end.min)); |
| 1694 |
|
| outer_end.store("sec", Simple(THIS->future.outer.end.sec)); |
| 1695 |
|
| outer.store("end", Ref::create(outer_end)); |
| 1696 |
|
| |
| 1697 |
|
| auto inner = Hash::create(); |
| 1698 |
|
| inner.store("abbrev", Simple(string_view(THIS->future.inner.abbrev, strlen(THIS->future.inner.abbrev)))); |
| 1699 |
|
| inner.store("offset", Simple(THIS->future.inner.offset)); |
| 1700 |
|
| inner.store("gmt_offset", Simple(THIS->future.inner.gmt_offset)); |
| 1701 |
|
| inner.store("isdst", Simple(THIS->future.inner.isdst)); |
| 1702 |
|
| |
| 1703 |
|
| auto inner_end = Hash::create(); |
| 1704 |
|
| inner_end.store("mon", Simple(THIS->future.inner.end.mon)); |
| 1705 |
|
| inner_end.store("week", Simple(THIS->future.inner.end.yday)); |
| 1706 |
|
| inner_end.store("day", Simple(THIS->future.inner.end.wday)); |
| 1707 |
|
| inner_end.store("hour", Simple(THIS->future.inner.end.hour)); |
| 1708 |
|
| inner_end.store("min", Simple(THIS->future.inner.end.min)); |
| 1709 |
|
| inner_end.store("sec", Simple(THIS->future.inner.end.sec)); |
| 1710 |
|
| inner.store("end", Ref::create(inner_end)); |
| 1711 |
|
| |
| 1712 |
|
| future.store("inner", Ref::create(inner)); |
| 1713 |
|
| } |
| 1714 |
|
| RETVAL.store("future", Ref::create(future)); |
| 1715 |
|
| |
| 1716 |
|
| auto trans = Array::create(); |
| 1717 |
|
| for (uint32_t i = 0; i < THIS->trans_cnt; ++i) trans.push(Ref::create(export_transition(THIS->trans[i], false))); |
| 1718 |
|
| RETVAL.store("transitions", Ref::create(trans)); |
| 1719 |
|
| |
| 1720 |
|
| RETVAL.store("past", Ref::create(export_transition(THIS->trans[0], true))); |
| 1721 |
|
| #line 1722 "xs/main_xsgen.cc" |
| 1722 |
|
| { |
| 1723 |
|
| SV * RETVALSV; |
| 1724 |
2 |
| RETVALSV = NULL; |
| 1725 |
2 |
▶ | if (!RETVAL) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!RETVAL) XSRETURN_UNDEF; |
0 |
2 |
2 |
|
| 1726 |
2 |
▶ | RETVALSV = newRV_noinc(RETVAL.detach()); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = newRV_noinc(RETVAL.detach()); |
2 |
0 |
2 |
|
| 1727 |
2 |
▶ | RETVALSV = sv_2mortal(RETVALSV); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVALSV = sv_2mortal(RETVALSV); |
2 |
0 |
2 |
|
| 1728 |
2 |
| ST(0) = RETVALSV; |
| 1729 |
|
| } |
| 1730 |
2 |
▶ | } |
Branch: 4 branches
| Branch | True | False | Total |
| } |
2 |
0 |
2 |
| } |
2 |
0 |
2 |
| } |
2 |
0 |
2 |
| } |
2 |
0 |
2 |
|
| 1731 |
2 |
| XSRETURN(1); |
| 1732 |
2 |
| }); } |
| 1733 |
|
| |
| 1734 |
|
| |
| 1735 |
|
| /* INCLUDE: Returning to 'main.xs' from 'Timezone.xsi' */ |
| 1736 |
|
| |
| 1737 |
|
| #ifdef __cplusplus |
| 1738 |
|
| extern "C" { |
| 1739 |
|
| #endif |
| 1740 |
|
| |
| 1741 |
96 |
▶ | XS_EXTERNAL(boot_Date) { xs::throw_guard(cv, [=]() mutable |
Branch: 1 branch
| Branch | True | False | Total |
| XS_EXTERNAL(boot_Date) { xs::throw_guard(cv, [=]() mutable |
48 |
0 |
48 |
|
| 1742 |
|
| { |
| 1743 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 1744 |
|
| dVAR; dXSARGS; |
| 1745 |
|
| #else |
| 1746 |
48 |
| dVAR; dXSBOOTARGSXSAPIVERCHK; |
| 1747 |
|
| #endif |
| 1748 |
|
| #if PERL_VERSION_LE(5, 8, 999) /* PERL_VERSION_LT is 5.33+ */ |
| 1749 |
|
| char* file = __FILE__; |
| 1750 |
|
| #else |
| 1751 |
48 |
| const char* file = __FILE__; |
| 1752 |
|
| #endif |
| 1753 |
|
| |
| 1754 |
|
| PERL_UNUSED_VAR(file); |
| 1755 |
|
| |
| 1756 |
|
| PERL_UNUSED_VAR(cv); /* -W */ |
| 1757 |
|
| PERL_UNUSED_VAR(items); /* -W */ |
| 1758 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 1759 |
|
| XS_VERSION_BOOTCHECK; |
| 1760 |
|
| # ifdef XS_APIVERSION_BOOTCHECK |
| 1761 |
|
| XS_APIVERSION_BOOTCHECK; |
| 1762 |
|
| # endif |
| 1763 |
|
| #endif |
| 1764 |
|
| |
| 1765 |
48 |
| newXS_deffile("Date::strict::import", XS_Date__strict_import); |
| 1766 |
48 |
| newXS_deffile("Date::strict::unimport", XS_Date__strict_unimport); |
| 1767 |
48 |
| newXS_deffile("Date::rdate", XS_Date_rdate); |
| 1768 |
48 |
| newXS_deffile("Date::rdate_ymd", XS_Date_rdate_ymd); |
| 1769 |
48 |
| newXS_deffile("Date::rdate_const", XS_Date_rdate_const); |
| 1770 |
48 |
| newXS_deffile("Date::rdate_ymd_const", XS_Date_rdate_ymd_const); |
| 1771 |
48 |
| newXS_deffile("Date::Rel::new", XS_Date__Rel_new); |
| 1772 |
48 |
| newXS_deffile("Date::Rel::new_ymd", XS_Date__Rel_new_ymd); |
| 1773 |
48 |
| newXS_deffile("Date::Rel::set", XS_Date__Rel_set); |
| 1774 |
48 |
| newXS_deffile("Date::Rel::set_ymd", XS_Date__Rel_set_ymd); |
| 1775 |
48 |
| newXS_deffile("Date::Rel::error", XS_Date__Rel_error); |
| 1776 |
48 |
| newXS_deffile("Date::Rel::sec", XS_Date__Rel_sec); |
| 1777 |
48 |
| newXS_deffile("Date::Rel::min", XS_Date__Rel_min); |
| 1778 |
48 |
| newXS_deffile("Date::Rel::hour", XS_Date__Rel_hour); |
| 1779 |
48 |
| newXS_deffile("Date::Rel::day", XS_Date__Rel_day); |
| 1780 |
48 |
| newXS_deffile("Date::Rel::month", XS_Date__Rel_month); |
| 1781 |
48 |
| newXS_deffile("Date::Rel::year", XS_Date__Rel_year); |
| 1782 |
48 |
| newXS_deffile("Date::Rel::from", XS_Date__Rel_from); |
| 1783 |
48 |
| newXS_deffile("Date::Rel::till", XS_Date__Rel_till); |
| 1784 |
48 |
| cv = newXS_deffile("Date::Rel::duration", XS_Date__Rel_to_secs); |
| 1785 |
48 |
| XSANY.any_i32 = 1; |
| 1786 |
48 |
| cv = newXS_deffile("Date::Rel::to_secs", XS_Date__Rel_to_secs); |
| 1787 |
48 |
| XSANY.any_i32 = 0; |
| 1788 |
48 |
| newXS_deffile("Date::Rel::to_mins", XS_Date__Rel_to_mins); |
| 1789 |
48 |
| newXS_deffile("Date::Rel::to_hours", XS_Date__Rel_to_hours); |
| 1790 |
48 |
| newXS_deffile("Date::Rel::to_days", XS_Date__Rel_to_days); |
| 1791 |
48 |
| newXS_deffile("Date::Rel::to_months", XS_Date__Rel_to_months); |
| 1792 |
48 |
| newXS_deffile("Date::Rel::to_years", XS_Date__Rel_to_years); |
| 1793 |
48 |
| newXS_deffile("Date::Rel::to_string", XS_Date__Rel_to_string); |
| 1794 |
48 |
| newXS_deffile("Date::Rel::_op_str", XS_Date__Rel__op_str); |
| 1795 |
48 |
| newXS_deffile("Date::Rel::to_bool", XS_Date__Rel_to_bool); |
| 1796 |
48 |
| newXS_deffile("Date::Rel::to_number", XS_Date__Rel_to_number); |
| 1797 |
48 |
| newXS_deffile("Date::Rel::sum", XS_Date__Rel_sum); |
| 1798 |
48 |
| newXS_deffile("Date::Rel::add", XS_Date__Rel_add); |
| 1799 |
48 |
| newXS_deffile("Date::Rel::difference", XS_Date__Rel_difference); |
| 1800 |
48 |
| newXS_deffile("Date::Rel::subtract", XS_Date__Rel_subtract); |
| 1801 |
48 |
| newXS_deffile("Date::Rel::product", XS_Date__Rel_product); |
| 1802 |
48 |
| newXS_deffile("Date::Rel::multiply", XS_Date__Rel_multiply); |
| 1803 |
48 |
| newXS_deffile("Date::Rel::quotient", XS_Date__Rel_quotient); |
| 1804 |
48 |
| newXS_deffile("Date::Rel::divide", XS_Date__Rel_divide); |
| 1805 |
48 |
| newXS_deffile("Date::Rel::negated", XS_Date__Rel_negated); |
| 1806 |
48 |
| newXS_deffile("Date::Rel::negate", XS_Date__Rel_negate); |
| 1807 |
48 |
| newXS_deffile("Date::Rel::compare", XS_Date__Rel_compare); |
| 1808 |
48 |
| newXS_deffile("Date::Rel::is_same", XS_Date__Rel_is_same); |
| 1809 |
48 |
| newXS_deffile("Date::Rel::includes", XS_Date__Rel_includes); |
| 1810 |
48 |
| newXS_deffile("Date::Rel::clone", XS_Date__Rel_clone); |
| 1811 |
48 |
| newXS_deffile("Date::HOOK_CLONE", XS_Date_HOOK_CLONE); |
| 1812 |
48 |
| newXS_deffile("Date::STORABLE_freeze", XS_Date_STORABLE_freeze); |
| 1813 |
48 |
| newXS_deffile("Date::STORABLE_attach", XS_Date_STORABLE_attach); |
| 1814 |
48 |
| newXS_deffile("Date::TO_JSON", XS_Date_TO_JSON); |
| 1815 |
48 |
| newXS_deffile("Date::Rel::HOOK_CLONE", XS_Date__Rel_HOOK_CLONE); |
| 1816 |
48 |
| newXS_deffile("Date::Rel::STORABLE_freeze", XS_Date__Rel_STORABLE_freeze); |
| 1817 |
48 |
| newXS_deffile("Date::Rel::STORABLE_attach", XS_Date__Rel_STORABLE_attach); |
| 1818 |
48 |
| newXS_deffile("Date::Timezone::name", XS_Date__Timezone_name); |
| 1819 |
48 |
| newXS_deffile("Date::Timezone::is_local", XS_Date__Timezone_is_local); |
| 1820 |
48 |
| newXS_deffile("Date::Timezone::export", XS_Date__Timezone_export); |
| 1821 |
|
| |
| 1822 |
|
| /* Initialisation Section */ |
| 1823 |
|
| |
| 1824 |
|
| #line 15 "xs/main.xs" |
| 1825 |
|
| { |
| 1826 |
|
| XS_BOOT(Date__Date); |
| 1827 |
|
| } |
| 1828 |
|
| |
| 1829 |
|
| #line 18 "xs/DateRel.xsi" |
| 1830 |
|
| { |
| 1831 |
|
| Stash stash("Date::Rel", GV_ADD); |
| 1832 |
|
| |
| 1833 |
|
| xs::exp::create_constants(stash, { |
| 1834 |
|
| {"FORMAT_SIMPLE", (int)DateRel::Format::simple}, |
| 1835 |
|
| {"FORMAT_ISO8601D", (int)DateRel::Format::iso8601d}, |
| 1836 |
|
| {"FORMAT_ISO8601I", (int)DateRel::Format::iso8601i}, |
| 1837 |
|
| |
| 1838 |
|
| {"INPUT_FORMAT_ALL", DateRel::InputFormat::all}, |
| 1839 |
|
| {"INPUT_FORMAT_SIMPLE", DateRel::InputFormat::simple}, |
| 1840 |
|
| {"INPUT_FORMAT_ISO8601", DateRel::InputFormat::iso8601}, |
| 1841 |
|
| {"INPUT_FORMAT_ISO8601D", DateRel::InputFormat::iso8601d}, |
| 1842 |
|
| {"INPUT_FORMAT_ISO8601I", DateRel::InputFormat::iso8601i}, |
| 1843 |
|
| }); |
| 1844 |
|
| } |
| 1845 |
|
| |
| 1846 |
|
| #line 1847 "xs/main_xsgen.cc" |
| 1847 |
|
| |
| 1848 |
|
| /* End of Initialisation Section */ |
| 1849 |
|
| |
| 1850 |
|
| #if PERL_VERSION_LE(5, 21, 5) |
| 1851 |
|
| # if PERL_VERSION_GE(5, 9, 0) |
| 1852 |
|
| if (PL_unitcheckav) |
| 1853 |
|
| call_list(PL_scopestack_ix, PL_unitcheckav); |
| 1854 |
|
| # endif |
| 1855 |
|
| XSRETURN_YES; |
| 1856 |
|
| #else |
| 1857 |
48 |
| Perl_xs_boot_epilog(aTHX_ ax); |
| 1858 |
|
| #endif |
| 1859 |
192 |
▶ | }); } |
Branch: 11 branches
| Branch | True | False | Total |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
48 |
0 |
48 |
| }); } |
0 |
0 |
0 |
| }); } |
0 |
0 |
0 |
|
| 1860 |
|
| |
| 1861 |
|
| #ifdef __cplusplus |
| 1862 |
|
| } |
| 1863 |
|
| #endif |