leptris 1.9.28-aarch64-linux → 1.9.30-aarch64-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: bc27ce25308956b6f5cbd275686b8872f7082f6c3cea568d127b5655a315fb94
4
- data.tar.gz: 6f06edf1df2cf34dfcd40f749d5e5ddc481deec21197e45b0d9e38f6bddf6333
3
+ metadata.gz: d5ffa0c10cc11c19f94d0bf3aa82e5b8f2b9cf6aaf730af9e8848b235e8b161c
4
+ data.tar.gz: b77a68bb3b0830570641b104b2fdbd9229ef8f42864c394b1176fdd9d6301ad7
5
5
  SHA512:
6
- metadata.gz: b8c27e5ce7f4b67a3940e88e369934ed03ad6233f2387c3924f64d0e7c3486968a7a4c3431e6f9d4e23cd11affb657e002537a038f1a0248af7c689188725e1d
7
- data.tar.gz: c7ed1e5a92a463ccad6908a039b359cfb640e197717de04865e5e59f3fbcbba6bd843ed61663c6fcaf1917695f997f156a6e50b8e5a7b9ef81f589745083521c
6
+ metadata.gz: 4bfb76b7bb8dbebff4bfc13da00e380ee467bddc2e2d55593f4d7e371b4b78edbd01dab3c2ff3599cd11982f9040a42979309474bf5d1a8b4b9f96483654fca5
7
+ data.tar.gz: a0e2e39804700ed50b8995b04d534fa74785e78672e690348ed82b96134598bfcda0a7a0f51baa90e36e48bb5b8002dec09c63bc6fcb37c673322ca6cd0ee3a9
data/CHANGELOG.md CHANGED
@@ -5,6 +5,50 @@ All notable changes to Leptris will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.9.30] - 2026-08-28
9
+
10
+ ### Fixed
11
+
12
+ - **DTD ATTLIST defaults no longer injected by default** (vendored
13
+ libleptris 1.9.8, leptris/leptris#606): raw parses leave ATTLIST
14
+ default attributes out — the libxml2/Nokogiri default the ecosystem
15
+ compares against, and what W3C C14N 1.1 example 3.3's canonical
16
+ form assumes. New `Leptris::XML::ParseOptions::DTDATTR` /
17
+ `.dtdattr` / `#dtdattr?` / `#dtdattr=` opts in (libxml2
18
+ XML_PARSE_DTDATTR parity).
19
+
20
+ ## [1.9.29] - 2026-08-28
21
+
22
+ ### Fixed
23
+
24
+ - **Element-batch truncation (1.9.28 regression)**:
25
+ `fetch_element_children`'s opportunistic growth read its sizing
26
+ from `leptris_element_children(ptr, NULL, 0)` — but that entry
27
+ point has NO count-only mode (NULL returns 0, unlike
28
+ `leptris_node_children`), so the truncation check always judged
29
+ "fits" and wide element families were cut to the scratch
30
+ capacity (32 on a fresh thread/process). `#element_children`
31
+ and `#last_element_child` both affected; elements with 32 or
32
+ fewer element children — and any process whose scratch had
33
+ already grown — were unaffected, which is why the round-XXIII
34
+ suite passed. Sizing now comes from the dedicated
35
+ `leptris_element_child_count`. Two fresh-Thread regression
36
+ specs pin the fresh-scratch state (the scratch is thread-local:
37
+ same-process test ordering had masked it); they fail on 1.9.28.
38
+ The count query fires only when the buffer fills exactly —
39
+ steady-state cost unchanged, the batch's -27% element_children
40
+ win holds.
41
+
42
+ ### Meta
43
+
44
+ - Compiled-expression cache for `Searchable#xpath` prototyped and
45
+ retired by measurement: mixed deltas across expression shapes,
46
+ one stable regression (parent-axis `..` +58% through
47
+ `leptris_xpath_compiled_eval` vs string eval, three interleaved
48
+ passes), suggesting the engine's string path already amortizes
49
+ compilation. Reverted in full; the parent-axis asymmetry is
50
+ worth an upstream look.
51
+
8
52
  ## [1.9.28] - 2026-08-28
9
53
 
10
54
  ### Changed
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
8
8
  # Pin for `rake compile` and the platform-gem builds. Keep in lockstep
9
9
  # with .github/workflows/build.yml (which calls `rake compile`) and the
10
10
  # CHANGELOG when libleptris releases.
11
- LIBLEPTRIS_VERSION = "1.9.7"
11
+ LIBLEPTRIS_VERSION = "1.9.8"
12
12
 
13
13
  CMAKE_FLAGS = %w[
14
14
  -DCMAKE_BUILD_TYPE=Release
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.28"
4
+ VERSION = "1.9.30"
5
5
  end
@@ -533,7 +533,6 @@ module Leptris
533
533
  attach_function :leptris_xpath_compiled_free,
534
534
 
535
535
  [:leptris_xpath_compiled], :void
536
-
537
536
  attach_function :leptris_sax_parse,
538
537
  [:string, :size_t, :pointer, :pointer], :int
539
538
  attach_function :leptris_sax_parser_create,
@@ -735,6 +734,10 @@ module Leptris
735
734
 
736
735
  LEPTRIS_PARSE_DEFAULT = 0
737
736
  LEPTRIS_PARSE_DROP_WS_TEXT = 1
737
+ # libleptris >= 1.9.8 (#606): apply DTD ATTLIST default (and
738
+ # #FIXED) attribute values at parse time — libxml2
739
+ # XML_PARSE_DTDATTR opt-in parity.
740
+ LEPTRIS_PARSE_DTDATTR = 2
738
741
 
739
742
  # The headers' contract is UTF-8 for every C string, but FFI's
740
743
  # read_string hands back ASCII-8BIT — the platform default
@@ -878,7 +881,10 @@ module Leptris
878
881
  cap = buffer.size / PTR_BYTES
879
882
  copied = leptris_element_children(el_ptr, buffer, cap)
880
883
  if copied == cap
881
- total = leptris_element_children(el_ptr, nil, 0)
884
+ # leptris_element_children has NO count-only mode (NULL
885
+ # returns 0, unlike leptris_node_children) — size the
886
+ # regrow from the dedicated counter.
887
+ total = leptris_element_child_count(el_ptr)
882
888
  if total > cap
883
889
  buffer.free
884
890
  buffer = scratch[:pointers] =
@@ -9,6 +9,14 @@ class Leptris::XML::ParseOptions
9
9
  # way do not round-trip pretty-printed formatting byte-for-byte.
10
10
  NOBLANKS = Leptris::XML::FFI::LEPTRIS_PARSE_DROP_WS_TEXT
11
11
 
12
+ # Apply DTD ATTLIST default (and #FIXED) attribute values at parse
13
+ # time (libleptris >= 1.9.8, leptris/leptris#606). Matches libxml2's
14
+ # XML_PARSE_DTDATTR and Nokogiri's dtdload+dtdattr semantics. Off by
15
+ # default: the ecosystem compares against libxml2's no-DTDATTR
16
+ # default, and W3C C14N 1.1 example 3.3's canonical form excludes
17
+ # defaulted attributes.
18
+ DTDATTR = Leptris::XML::FFI::LEPTRIS_PARSE_DTDATTR
19
+
12
20
  attr_reader :flags
13
21
 
14
22
  # Recover (libleptris 1.9.0, #547): a parse failure returns an
@@ -36,6 +44,18 @@ class Leptris::XML::ParseOptions
36
44
  @flags & NOBLANKS != 0
37
45
  end
38
46
 
47
+ def self.dtdattr
48
+ new(DTDATTR)
49
+ end
50
+
51
+ def dtdattr?
52
+ @flags & DTDATTR != 0
53
+ end
54
+
55
+ def dtdattr=(value)
56
+ if value then @flags |= DTDATTR else @flags &= ~DTDATTR end
57
+ end
58
+
39
59
  def recover?
40
60
  @recover == true
41
61
  end
data/lib/libleptris.so CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.28
4
+ version: 1.9.30
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.