leptris 1.9.390.0-arm-linux → 1.9.390.2-arm-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: e1f6473ab1e7001f70f7bd3fe14cdf1da1e0debb40f498103bbb91d68a176e68
4
- data.tar.gz: 2e45d0158274323e9f47d089671e3a2761b24769f052934c8146947453fdd4f0
3
+ metadata.gz: f9f5c050ed466657fb11f0092447a356672c98a0aa0a415c80c4365df5e1e5a9
4
+ data.tar.gz: 1216fcedccc4c192dfdeaff56fb4bb44d66b3e86ac22a3e2788b28d84555ae10
5
5
  SHA512:
6
- metadata.gz: ef0f1ebea3d784ea055059fa2500c755fa7d9416c2bafb8b641e373511705a83abfb156734574c1cb1b91cfb915d9729a0c298f84a8dc89ce4eb80bd2096b24a
7
- data.tar.gz: 1ed6d494a872ac9f99c2956dce51853a2ea5a3c752ae47c0d145b39d3ee94cb5ae90df0f5f7bea971286a5f7cdacac934b921a07b29535cdceca42eccc2440d6
6
+ metadata.gz: 0fb2438f429c7fc069d61d22c043e7a47bd86163831bf05e9a5f9da33280600a2de098b4d6d3062294cdc44ee77ef03d9f93200d5774fb3b1ab4b7bd0b15c700
7
+ data.tar.gz: fd86e179989e136c29e96d37c7d2fdff2911ec223a1524f7f01a17736c56f591090b698ce495bb482cfbc08168c5416ca719616949799a6dc30e3ad19d65a22c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### Added — 1.9.390.2 (namespace snapshot face)
4
+
5
+ - **Element#namespace_declarations_snapshot (leptris-ruby#565).**
6
+ The engine's bulk in-scope declaration snapshot (libleptris 1.9.388)
7
+ as {path:, prefix:, href:} rows — one engine call replaces the
8
+ per-node namespace_definitions union walk (lutaml-model#1018's
9
+ largest ours-side site). Soft-attached + respond_to?-probed per the
10
+ soft-attach law; parity-pinned against the per-node walk in specs.
11
+
12
+
13
+ ### Added — 1.9.390.1 (prebuilt-matrix ride)
14
+
15
+ - **Ruby 4.0 native bundles ship in the platform gems (#563, #554).**
16
+ The per-minor prebuilt matrix gains `native_4_0.*` per platform —
17
+ 4.0 installs engage the native layer instead of silently falling
18
+ back to FFI (the builder compiled clean under 4.0; glossarist
19
+ output verified byte-identical on the issue). Windows already
20
+ shipped `Init_native_4_0` DLLs.
21
+
22
+
3
23
  ### Changed — 1.9.389.0 (rides libleptris 1.9.389)
4
24
 
5
25
  - Engine pin 1.9.388 -> 1.9.389: the XSD content-model automaton
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.390.0"
4
+ VERSION = "1.9.390.2"
5
5
  end
@@ -1007,6 +1007,60 @@ class Leptris::XML::Element < Leptris::XML::Node
1007
1007
  result
1008
1008
  end
1009
1009
 
1010
+ # libleptris 1.9.388 (leptris#1874): the bulk in-scope namespace
1011
+ # declaration snapshot — every (element, declaration) row under
1012
+ # this element in document order, one engine call. Rows are
1013
+ # {path:, prefix:, href:} with path an ancestor-first name array
1014
+ # (empty for self) — the exact shape lutaml-model#1054's
1015
+ # plan-hydrator contract consumes. Defined only when the native
1016
+ # face attached (the soft attach above); consumers probe with
1017
+ # respond_to?.
1018
+ if Leptris::XML::FFI.respond_to?(
1019
+ :leptris_element_namespace_declarations_snapshot,
1020
+ )
1021
+ def namespace_declarations_snapshot
1022
+ ensure_alive!
1023
+ fn = Leptris::XML::FFI
1024
+ out_count = ::FFI::MemoryPointer.new(:size_t)
1025
+ out_blob = ::FFI::MemoryPointer.new(:size_t)
1026
+ rc = fn.leptris_element_namespace_declarations_snapshot(
1027
+ c_ptr, nil, 0, out_count, nil, 0, out_blob,
1028
+ )
1029
+ return [] unless rc.zero?
1030
+
1031
+ rows_cap = out_count.read(:size_t)
1032
+ blob_cap = out_blob.read(:size_t)
1033
+ return [] if rows_cap.zero?
1034
+
1035
+ stride = 7 * ::FFI.type_size(:uint32)
1036
+ rows = ::FFI::MemoryPointer.new(stride * rows_cap)
1037
+ blob = ::FFI::MemoryPointer.new(blob_cap)
1038
+ rc = fn.leptris_element_namespace_declarations_snapshot(
1039
+ c_ptr, rows, rows_cap, out_count, blob, blob_cap, out_blob,
1040
+ )
1041
+ return [] if rc != 0
1042
+
1043
+ u32s = rows.read_array_of_uint32(7 * rows_cap)
1044
+ (0...rows_cap).map do |i|
1045
+ depth, _name_count, names_off, prefix_off, prefix_len,
1046
+ href_off, href_len = u32s.slice(i * 7, 7)
1047
+ path = depth.times.map do |k|
1048
+ name_ptr = blob + names_off
1049
+ s = name_ptr.get_string(0)
1050
+ names_off += s.bytesize + 1
1051
+ s
1052
+ end
1053
+ prefix = if prefix_off == 0xFFFF_FFFF
1054
+ nil
1055
+ else
1056
+ (blob + prefix_off).get_string(0, prefix_len)
1057
+ end
1058
+ href = (blob + href_off).get_string(0, href_len)
1059
+ { path: path, prefix: prefix, href: href }
1060
+ end
1061
+ end
1062
+ end
1063
+
1010
1064
  def namespaces
1011
1065
  return @namespaces if memo_hit?(@namespaces_version)
1012
1066
  scopes = {}
@@ -453,6 +453,18 @@ module Leptris
453
453
  nil
454
454
  end
455
455
 
456
+ # libleptris 1.9.388 (leptris#1874/#1884): the bulk in-scope
457
+ # namespace-declaration snapshot — one call replaces the
458
+ # per-node namespace_definitions union walk (lutaml-model#1018).
459
+ # SOFT attach — engines before 1.9.388 lack the symbol.
460
+ begin
461
+ attach_function :leptris_element_namespace_declarations_snapshot,
462
+ [:leptris_element, :pointer, :size_t, :pointer,
463
+ :pointer, :size_t, :pointer], :size_t
464
+ rescue ::FFI::NotFoundError
465
+ nil
466
+ end
467
+
456
468
  # libleptris 1.9.312 (#1551): serialize a walk result back
457
469
  # to XML guided by its plan — the plan supplies element
458
470
  # wrappers (row wire_name + ns_prefix), the result the
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.390.0
4
+ version: 1.9.390.2
5
5
  platform: arm-linux
6
6
  authors:
7
7
  - Ribose Inc.