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