yeptris 0.6.20.2 → 0.6.21.1

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: 1d91dc30d6dd414d0b22ce84b0e573850efa6a86e7d6fcef4425e2d4afc2fca2
4
- data.tar.gz: 9efe2971ff5b4159b077fba5330a12c0c2ac91bb6849c36c86a83ddeba243a86
3
+ metadata.gz: 0e922e44335b527306176e0c8cb0bc6288d6c496ef4ee0b89a625eeffea4677a
4
+ data.tar.gz: 769ec0ef8c16977643a8275f761c072a2d661002a0e034716ad13ae2acb547c7
5
5
  SHA512:
6
- metadata.gz: b40b768c6103cc5715059d7f93350c8c2f9298f86297e2133cf339ec269529237a964bcab0ef5a6ea998a609b5370ac640ba6d195b741bd9382037e2a3114a83
7
- data.tar.gz: ecfe46a3b63e70b38c11541f6926b7e59a622e8450401b0ff271a362d854317f4bc40647b9ffa2bda3233db3b1e3f09470385f8768f27b794b9655a387123ed4
6
+ metadata.gz: e7bdf3c8e2e464eb99b2e1bd7dfc25466d28c67e4f4d25abcb60819cd19512d7c8530b31fdc029b1d3fa7d4e56c5f64954f6258d0bd0a5f7f8ef04587f6d5680
7
+ data.tar.gz: afa1d58e082ce0fe28360e769f9a708bce2a874b856c88dc72718a5df489b1062ef2fbed48adb7f845d90d2e20aa9f557c4aad216b9c2eca044c76d5acbc8d6a
data/lib/yeptris.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Yeptris
4
4
  # The gem's version lives in the parent namespace's file — the last
5
5
  # internal require (yeptris/version) retired with it.
6
- VERSION = "0.6.20.2".freeze
6
+ VERSION = "0.6.21.1".freeze
7
7
 
8
8
  # Informational notices are OPT-IN (yeptris-ruby#217): consumers
9
9
  # embed yeptris inside CLIs that assert clean stderr, and a
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(yeptris
6
- VERSION 0.6.20
6
+ VERSION 0.6.21
7
7
  DESCRIPTION "Ultra-fast YAML 1.2 parser, emitter and streamer in C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -542,18 +542,18 @@ uint32_t dom_indexed_child(yep_dom* d, uint32_t cid, size_t index, uint32_t* cou
542
542
  *count_out = 0;
543
543
  return UINT32_MAX;
544
544
  }
545
+ /* the midx discipline (TSAN, Threads.ReadOnlySharing): READS of
546
+ * the cache ride the mutex too — a concurrent builder publishes
547
+ * under it, so the old unlocked hit path raced the build's
548
+ * stores. Uncontended in the single-threaded hot path. */
549
+ yep_mutex_lock(&d->midx.mu);
550
+ uint32_t out;
545
551
  *count_out = n->count;
546
552
  if (d->child_cache_id == cid) {
547
- if (index < d->child_cache_len) {
548
- return d->child_cache[index];
549
- }
550
- return UINT32_MAX;
551
- }
552
- /* miss: build once under the lazy-init mutex (Threads.
553
- * ReadOnlySharing — concurrent first calls race here exactly like
554
- * the handle pool's) */
555
- yep_mutex_lock(&d->midx.mu);
556
- if (d->child_cache_id != cid) {
553
+ out = index < d->child_cache_len ? d->child_cache[index] : UINT32_MAX;
554
+ } else {
555
+ /* miss: build once under the lazy-init mutex (concurrent
556
+ * first calls race here exactly like the handle pool's) */
557
557
  yep_free(d->sys, d->child_cache);
558
558
  d->child_cache = NULL;
559
559
  d->child_cache_len = 0;
@@ -574,12 +574,10 @@ uint32_t dom_indexed_child(yep_dom* d, uint32_t cid, size_t index, uint32_t* cou
574
574
  }
575
575
  }
576
576
  d->child_cache_id = cid;
577
+ out = index < d->child_cache_len ? d->child_cache[index] : UINT32_MAX;
577
578
  }
578
579
  yep_mutex_unlock(&d->midx.mu);
579
- if (index < d->child_cache_len) {
580
- return d->child_cache[index];
581
- }
582
- return UINT32_MAX;
580
+ return out;
583
581
  }
584
582
 
585
583
  void yep_dom_destroy(yep_dom* d) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.20.2
4
+ version: 0.6.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-24 00:00:00.000000000 Z
11
+ date: 2026-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi