leptris 1.9.156.2 → 1.9.160.0

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: c649879fc6a03c38e8c36df987c079271d62583992ae6836f23f53dae102a82e
4
- data.tar.gz: 91c1a0d1f5101f73841bfee5ca6fd4ad07bbe36a9b6035c7542d3c43bac14b7e
3
+ metadata.gz: 2644772a66a1e58e517fe5b5e2b2fb417ac1592863f3de375d1659ecebfeaec6
4
+ data.tar.gz: ee478cc9f2387ff6527a680c37817d1c650bfe50c0e9c891768784db396cc29c
5
5
  SHA512:
6
- metadata.gz: 12b2aaa87ab88a85f9c2023a976869a30ae53bb6671d8bf47d0097e87870a5b8eb3fe0b728d564ae6312b46f2343b2a3db5720cdd6b4ce27a86c1ddb9826547e
7
- data.tar.gz: 5435202bd16c7175dfb1a36d49bf3027ed562729f7f99a1a98b393aa9daf85f0a338e019f953864ad07ee13be3457f15b2e7b6e730e67db9d8adf2c4b2f76703
6
+ metadata.gz: 7e6dfa835f5704689bf7fa50bfac557bf4637b556b9f84f6ae437cf020bafe09cb42c866692d159da8f11ed0a8bad9439d13639f4c6380159d9d0c2a75600d42
7
+ data.tar.gz: 33558c5c76bbc5130b52e4d4d2258f4918e9c101e18494772d29a55ad758ab089b98753d9ca6cea9cd0ca7ae09107d952c701d6dcdcbdb7557a0c3b13ea7e067
data/CHANGELOG.md CHANGED
@@ -5,7 +5,26 @@ 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.156.2] - 2026-09-13
8
+ ## [1.9.160.0] - 2026-09-14
9
+
10
+ ### Changed
11
+
12
+ - **Lockstep with libleptris 1.9.160** (1.9.156 → 1.9.160; audit
13
+ 290 → 291): the lane-18 engine performance arc — one TLS read
14
+ per document resolution (under nearly every API call; 1.9.158),
15
+ inline tree-edge encoding and register promotion in the parse
16
+ loop, inline int32 edge codecs, document-free back to
17
+ O(this document) (1.9.159), split_qname colon gate, shared edge
18
+ tables for parent reads, name carve, one-strlen attribute find
19
+ (1.9.160).
20
+ - **`Document#add_comment(content)`** (libleptris 1.9.160, #1032):
21
+ the document-level comment writer (epilog append, the #add_pi
22
+ twin) — parsed document-level comments round-tripped since
23
+ 1.9.3; this closes the creation gap.
24
+ - Fixed a duplicate `leptris_element_create_child` attachment
25
+ left by the stacked 1.9.156 lockstep commits (audit silently
26
+ deduplicated; now clean at 291/291).
27
+ \n## [1.9.156.2] - 2026-09-13
9
28
 
10
29
  ### Added
11
30
 
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.156"
11
+ LIBLEPTRIS_VERSION = "1.9.160"
12
12
  # Vendored alongside libleptris for fn:normalize-unicode (TODO
13
13
  # .restructure/20): built per platform with a RELOCATABLE @rpath
14
14
  # install name, loaded by ffi.rb before libleptris so the
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.156.2"
4
+ VERSION = "1.9.160.0"
5
5
  end
@@ -416,6 +416,19 @@ class Leptris::XML::Document
416
416
  self
417
417
  end
418
418
 
419
+ # Append a document-level comment (epilog position, after the
420
+ # root element) — the add_pi twin (libleptris 1.9.160, #1032;
421
+ # parsed document-level comments round-tripped since 1.9.3/#578,
422
+ # this is the writer). Returns self.
423
+ def add_comment(content)
424
+ witness = Leptris::XML::FFI.leptris_document_add_comment(
425
+ @c_ptr, content.to_s)
426
+ raise Leptris::XML::Error,
427
+ "leptris_document_add_comment failed" if witness.null?
428
+ @version += 1
429
+ self
430
+ end
431
+
419
432
  # Marks the document read-only: tree mutations raise
420
433
  # Leptris::XML::ReadOnlyError, and read paths memoize aggressively
421
434
  # (names, content, children, attributes) since they can never go
@@ -220,6 +220,10 @@ attach_function :leptris_parse_string,
220
220
  [:leptris_document, :string, :size_t], :leptris_node_ref
221
221
  attach_function :leptris_document_add_pi,
222
222
  [:leptris_document, :string, :string], :pointer
223
+ # Document-level comment writer (libleptris 1.9.160, #1032):
224
+ # epilog append, the add_pi shape.
225
+ attach_function :leptris_document_add_comment,
226
+ [:leptris_document, :string], :leptris_node_ref
223
227
  # Document-level comments (libleptris 1.9.3, #578): parsed
224
228
  # <!-- ... --> outside the root, prolog then epilog, in
225
229
  # document order. Read-only surface (no add_comment yet).
@@ -435,8 +439,6 @@ attach_function :leptris_parse_string,
435
439
 
436
440
  attach_function :leptris_element_create,
437
441
  [:leptris_document, :string], :leptris_element
438
- attach_function :leptris_element_create_child,
439
- [:leptris_element, :string], :leptris_element
440
442
  attach_function :leptris_element_set_name,
441
443
  [:leptris_element, :string], :leptris_status
442
444
  attach_function :leptris_element_set_text,
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.156.2
4
+ version: 1.9.160.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.