teptris 0.3.18.0-s390x-linux → 0.3.19.1-s390x-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cc263fe0ea113e4e0d0361cb5eff6aee0fc42e78ba87b8d2529c3680cdc365d
4
- data.tar.gz: d0d606176c18b2d18e96ab1282ad0044d80544919905387690a0bbc399662389
3
+ metadata.gz: 4b4539d7f33f6ce8a1d3b8f3f7234b8b38e86ae93cbd3cf17501f24ad0fd5685
4
+ data.tar.gz: 9972e1e587051914eeb898d9d6a79c99246c40e4affc6609c61adca9bf7ce78b
5
5
  SHA512:
6
- metadata.gz: b97377d47839b7ccc4ab4ef1e81b1ecc6545459a836d2d967bc86ee365f233ed5d94894a90e2e3d289dcf6f53147fe58ee049237bea2ff5c2c7057a992c2c822
7
- data.tar.gz: c462cfb9b77da1a6debec5ebf8812d0904487ffc405c1d21bb21fa8f7ad41cdc7abc8291d840f371fb8c0ee87e73d11b39959e8645ada2416db60a13caa3610c
6
+ metadata.gz: e58d2ae3f9eeff571aad1dcb54853824ca0397a6fb79511f853fb7b4d942def68368333db6652e67d2070025631688878c81ef20a9d3ca102c0e28fb0572f75d
7
+ data.tar.gz: aeb40fce09accc0d00bfb3bd1ae3cc1a4ba04729ae861724b131b4d991985fdc72589e4b4cfb3437cedf1b00225f087ba84423f3d712effc1ab84352ce3fe4a8
@@ -1,4 +1,4 @@
1
- # libteptris 0.3.18 — vendored source
1
+ # libteptris 0.3.19 — vendored source
2
2
 
3
3
  This directory carries the COMPLETE C source of the engine this
4
4
  gem's extension was built from (the packaging doctrine: compiled
@@ -4,6 +4,6 @@
4
4
  #define TEPTRIS_VERSION_MAJOR 0
5
5
  #define TEPTRIS_VERSION_MINOR 3
6
6
  #define TEPTRIS_VERSION_PATCH 0
7
- #define TEPTRIS_VERSION_STRING "0.3.18"
7
+ #define TEPTRIS_VERSION_STRING "0.3.19"
8
8
 
9
9
  #endif /* TEPTRIS_VERSION_H */
@@ -9,7 +9,7 @@
9
9
  #define FMT_FORBID_TIME 2
10
10
  #define FMT_FORBID_DATE 4
11
11
 
12
- static VALUE eParseError, eError, cDate, cDoc;
12
+ static VALUE eParseError, eError, cDate, cDoc, gregorian_start;
13
13
  /* rb_raise's varargs formatting segfaults in its format dispatch on
14
14
  * windows x64-mingw-ucrt ruby 4.0 (diag #158/#160: the identical raise
15
15
  * crashes across PGO on/off while direct exception construction runs
@@ -239,8 +239,9 @@ static VALUE obj_from_node(const teptris_node *n, unsigned flags,
239
239
  if (flags & FMT_FORBID_DATE)
240
240
  raise_teptris("value materializes Date, which is not in "
241
241
  "permitted_classes (use datetime_policy: :string)");
242
- return rb_funcall(cDate, rb_intern("new"), 3,
243
- INT2FIX(d.year), INT2FIX(d.month), INT2FIX(d.day));
242
+ return rb_funcall(cDate, rb_intern("new"), 4,
243
+ INT2FIX(d.year), INT2FIX(d.month),
244
+ INT2FIX(d.day), gregorian_start);
244
245
  }
245
246
  return dt_string(&d, kind); /* local time: canonical string */
246
247
  }}
@@ -477,10 +478,16 @@ static void dump_scalar(teptris_builder *b, const char *key, size_t klen,
477
478
  }
478
479
  if (rb_obj_is_kind_of(v, cDate)) {
479
480
  /* DateTime is a Date subclass: dumps its date part, as the
480
- * Ruby-era dump writers did. One crossing: jd -> civil. */
481
+ * Ruby-era dump writers did. The civil fields come
482
+ * DIRECTLY off the Date: Date#jd is interpreted with the
483
+ * date's calendar reform (default ITALY), so the old
484
+ * jd -> civil crossing shifted pre-1582 dates by the
485
+ * reform offset (0001-01-01 roundtripped as 0000-12-30).
486
+ * year/month/day are exact under every reform. */
481
487
  teptris_datetime dt = {0};
482
- int64_t jd = NUM2LL(rb_funcall(v, rb_intern("jd"), 0));
483
- civil_from_days(jd - 2440588, &dt.year, &dt.month, &dt.day);
488
+ dt.year = (int32_t)NUM2LL(rb_funcall(v, rb_intern("year"), 0));
489
+ dt.month = (uint8_t)NUM2LL(rb_funcall(v, rb_intern("month"), 0));
490
+ dt.day = (uint8_t)NUM2LL(rb_funcall(v, rb_intern("day"), 0));
484
491
  dump_check(teptris_builder_put_datetime(b, key, klen,
485
492
  TEPTRIS_DATE_LOCAL, &dt));
486
493
  return;
@@ -651,9 +658,9 @@ static VALUE asm_rows(const teptris_plan *p, const teptris_plan_result *res,
651
658
  break;
652
659
  case TEPTRIS_DATE_LOCAL:
653
660
  if (teptris_plan_result_datetime_at(res, i, &d) == TEPTRIS_OK) {
654
- val = rb_funcall(cDate, rb_intern("new"), 3,
661
+ val = rb_funcall(cDate, rb_intern("new"), 4,
655
662
  INT2FIX(d.year), INT2FIX(d.month),
656
- INT2FIX(d.day));
663
+ INT2FIX(d.day), gregorian_start);
657
664
  }
658
665
  break;
659
666
  case TEPTRIS_TIME_LOCAL:
@@ -722,10 +729,10 @@ static VALUE asm_rows(const teptris_plan *p, const teptris_plan_result *res,
722
729
  val,
723
730
  teptris_plan_result_array_value_kind_at(
724
731
  res, i, j) == TEPTRIS_DATE_LOCAL
725
- ? rb_funcall(cDate, rb_intern("new"), 3,
732
+ ? rb_funcall(cDate, rb_intern("new"), 4,
726
733
  INT2FIX(d.year),
727
734
  INT2FIX(d.month),
728
- INT2FIX(d.day))
735
+ INT2FIX(d.day), gregorian_start)
729
736
  : dt_string(&d, TEPTRIS_TIME_LOCAL));
730
737
  }
731
738
  break;
@@ -1379,6 +1386,7 @@ void Init_teptris_ext(void) {
1379
1386
  eParseError = rb_const_get(t, rb_intern("ParseError"));
1380
1387
  rb_funcall(rb_mKernel, rb_intern("require"), 1, rb_str_new_cstr("date"));
1381
1388
  cDate = rb_const_get(rb_cObject, rb_intern("Date"));
1389
+ gregorian_start = rb_const_get(cDate, rb_intern("GREGORIAN"));
1382
1390
  id_utc_offset = rb_intern("utc_offset");
1383
1391
  id_to_s = rb_intern("to_s");
1384
1392
  id_to_i = rb_intern("to_i");
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teptris
4
- VERSION = "0.3.18.0"
4
+ VERSION = "0.3.19.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.18.0
4
+ version: 0.3.19.1
5
5
  platform: s390x-linux
6
6
  authors:
7
7
  - teptris contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-01 00:00:00.000000000 Z
11
+ date: 2026-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A native C extension over libteptris, a C99 TOML 1.1 parser/emitter.
14
14
  API shape mirrors the tomlib gem.