leptris 1.9.340.0 → 1.9.342.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 +4 -4
- data/CHANGELOG.md +31 -0
- data/Rakefile +1 -1
- data/ext/leptris/native/native.c +18 -1
- data/lib/leptris/vendor/aarch64-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/aarch64-linux-musl/libleptris.so +0 -0
- data/lib/leptris/vendor/arm-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/arm-linux-musl/libleptris.so +0 -0
- data/lib/leptris/vendor/arm64-darwin/libleptris.dylib +0 -0
- data/lib/leptris/vendor/ppc64le-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/s390x-linux-musl/libleptris.so +0 -0
- data/lib/leptris/vendor/x86_64-darwin/libleptris.dylib +0 -0
- data/lib/leptris/vendor/x86_64-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/x86_64-linux-musl/libleptris.so +0 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/descriptor.rb +39 -3
- data/lib/leptris/xml/element.rb +18 -7
- data/lib/leptris/xml/ffi.rb +20 -0
- data/lib/leptris/xml/node.rb +22 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +71 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/include/leptris/descriptor.h +27 -0
- data/vendor-src/libleptris/src/leptris/descriptor/plan.c +226 -12
- data/vendor-src/libleptris/src/leptris/rng/rng_regex.c +71 -3
- data/vendor-src/libleptris/src/leptris/serialize/serialize.c +38 -0
- data/vendor-src/libleptris/src/leptris/xsd/compile.c +98 -3
- data/vendor-src/libleptris/src/leptris/xsd/datatypes.c +27 -5
- data/vendor-src/libleptris/test/abi/test_descriptor.cpp +120 -0
- data/vendor-src/libleptris/test/dom/test_dom.cpp +77 -0
- data/vendor-src/libleptris/test/serializer/test_serialize.cpp +25 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/import_dag/a1.xsd +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/import_dag/a2.xsd +4 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/import_dag/b1.xsd +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/import_dag/b2.xsd +4 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/import_dag/s.xsd +3 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/import_dag/w.xsd +5 -0
- data/vendor-src/libleptris/test/xsd/test_xsd_compile.cpp +93 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d35a3680b1e44935421bd7896695114dae8c8038f9ec61250acf5b0f7a127fb
|
|
4
|
+
data.tar.gz: 53ab93d7bf80c535f3dd7f1c5c8d4beeb3c58a3667a42bfce94a7810e93324a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4996a04e9d83156b0b5384d90f29299cc1f9c21cb9b51f2e627f2949d6dbd310440ecf4842fd66ddedb28093d430441731ecd3e4703390abb56b9f9d0ef9acbc
|
|
7
|
+
data.tar.gz: c3d1a0e6a67cbef6cab74096f82d0d03d574c67c81515d0a1a46aa86042ed6b9045efd62c339fccb7ac89a645f8cc482c3928c8573221c0677de66d66ddc575f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [1.9.342.0] - 2026-10-12
|
|
2
|
+
|
|
3
|
+
### Fixed — engine sync (libleptris 1.9.342)
|
|
4
|
+
|
|
5
|
+
- **The #434 corpus lexical families (#1655)**: (1) the XSD
|
|
6
|
+
length family counts OCTETS for hexBinary/base64Binary (Part 2
|
|
7
|
+
semantics) — ST_LongHexNumber = hexBinary+length 4 = 8 hex
|
|
8
|
+
digits; the engine demanded 4 characters and rejected every
|
|
9
|
+
canonical rsid. The restriction chain's terminal builtin threads
|
|
10
|
+
into the facet check (hex digits/2, base64 decoded). (2) The
|
|
11
|
+
XSD regex matcher gains property classes (\p{IsBasicLatin} et
|
|
12
|
+
al.), character-class subtraction, and \t/\n/\r escapes —
|
|
13
|
+
ST_ContentType's giant pattern previously failed to PARSE and a
|
|
14
|
+
parse failure rejected everything. Verified through the binding:
|
|
15
|
+
octet hex semantics at the type level; the real
|
|
16
|
+
[Content_Types].xml validates with ZERO errors against the real
|
|
17
|
+
opc-contentTypes.xsd (the 339-error family is gone); document
|
|
18
|
+
error distributions carry no lexical families — the residual
|
|
19
|
+
corpus delta is the documented strict-ISO structural layer.
|
|
20
|
+
|
|
1
21
|
## [1.9.340.0] - 2026-10-11
|
|
2
22
|
|
|
3
23
|
### Added — engine sync (libleptris 1.9.338-1.9.340)
|
|
@@ -1165,6 +1185,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1165
1185
|
|
|
1166
1186
|
## [Unreleased]
|
|
1167
1187
|
|
|
1188
|
+
## [1.9.341.0] - 2026-10-12
|
|
1189
|
+
|
|
1190
|
+
### Changed
|
|
1191
|
+
|
|
1192
|
+
- **Ride libleptris v1.9.341** — XSD import-DAG dedup (the
|
|
1193
|
+
dml-main multi-GB/minutes compile fix, leptris#1644 /
|
|
1194
|
+
leptris-ruby#423), indent_html last-block-child nesting
|
|
1195
|
+
(leptris#1647), and the absorb/copy survival specs
|
|
1196
|
+
(leptris#1646).
|
|
1197
|
+
|
|
1198
|
+
|
|
1168
1199
|
### Added — Descriptor typed scalars + the fused materialize entry (#230's consumer contract)
|
|
1169
1200
|
|
|
1170
1201
|
- **Typed scalars**: attribute and child plan rows accept
|
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.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.342"
|
|
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
|
data/ext/leptris/native/native.c
CHANGED
|
@@ -56,6 +56,7 @@ typedef void *(*elem_new_attrs_fn)(void *, const char *, const char **,
|
|
|
56
56
|
typedef void *(*text_create_fn)(void *, const char *);
|
|
57
57
|
typedef void *(*create_child_fn)(void *, const char *);
|
|
58
58
|
typedef int (*append_child_fn)(void *, void *);
|
|
59
|
+
typedef int (*append_child_installed_fn)(void *, void *, void **);
|
|
59
60
|
typedef int (*set_attr_fn)(void *, const char *, const char *);
|
|
60
61
|
typedef int (*set_root_fn)(void *, void *);
|
|
61
62
|
typedef void (*doc_free_fn)(void *);
|
|
@@ -90,6 +91,7 @@ static elem_new_attrs_fn f_elem_new_with_attrs;
|
|
|
90
91
|
static text_create_fn f_text_create;
|
|
91
92
|
static create_child_fn f_create_child;
|
|
92
93
|
static append_child_fn f_append_child;
|
|
94
|
+
static append_child_installed_fn f_append_child_installed;
|
|
93
95
|
static append_child_fn f_prepend_child, f_insert_after, f_insert_before;
|
|
94
96
|
typedef void *(*elem_new_attrs_fn)(void *, const char *, const char **,
|
|
95
97
|
const char **, size_t);
|
|
@@ -241,6 +243,8 @@ static void resolve_symbols(const char *lib_path)
|
|
|
241
243
|
f_text_create = (text_create_fn)lib_sym(h, "leptris_text_node_create");
|
|
242
244
|
f_create_child = (create_child_fn)lib_sym(h, "leptris_element_create_child");
|
|
243
245
|
f_append_child = (append_child_fn)lib_sym(h, "leptris_element_append_child");
|
|
246
|
+
f_append_child_installed = (append_child_installed_fn)lib_sym(
|
|
247
|
+
h, "leptris_element_add_child_addr_installed");
|
|
244
248
|
f_prepend_child = (append_child_fn)lib_sym(h, "leptris_element_prepend_child");
|
|
245
249
|
f_insert_after = (append_child_fn)lib_sym(h, "leptris_element_insert_after");
|
|
246
250
|
f_insert_before = (append_child_fn)lib_sym(h, "leptris_element_insert_before");
|
|
@@ -789,9 +793,22 @@ static VALUE nf_append_binding_child(VALUE self, VALUE document,
|
|
|
789
793
|
* mutation merely discards memos. */
|
|
790
794
|
rb_ivar_set(document, id_iv_version,
|
|
791
795
|
LONG2FIX(FIX2LONG(rb_ivar_get(document, id_iv_version)) + 1));
|
|
796
|
+
/* leptris#1636: cross-pool children are adopted by COPY inside
|
|
797
|
+
* the engine — return the INSTALLED address so the caller can
|
|
798
|
+
* rebase its wrapper. 0 means the move was by reference; the
|
|
799
|
+
* argument address stays valid. The twin reads element-form
|
|
800
|
+
* fields on the child (get_document misreads non-element
|
|
801
|
+
* structs), so text/comment/PI children keep the legacy face. */
|
|
802
|
+
if (f_append_child_installed &&
|
|
803
|
+
f_node_type(child) == NT_ELEMENT) {
|
|
804
|
+
void *installed = NULL;
|
|
805
|
+
st = f_append_child_installed(parent, child, &installed);
|
|
806
|
+
check_status_c(st);
|
|
807
|
+
return ULL2NUM((unsigned long long)(uintptr_t)installed);
|
|
808
|
+
}
|
|
792
809
|
st = f_append_child(parent, child);
|
|
793
810
|
check_status_c(st);
|
|
794
|
-
return
|
|
811
|
+
return ULL2NUM(0);
|
|
795
812
|
}
|
|
796
813
|
|
|
797
814
|
/* Batch append (leptris-ruby#366): one crossing for N children.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/leptris/version.rb
CHANGED
|
@@ -410,11 +410,28 @@ class Leptris::XML::Descriptor
|
|
|
410
410
|
# declared exactly once, on the output root, first-encounter
|
|
411
411
|
# order. Text and attribute values are escaped; RAW members are
|
|
412
412
|
# verbatim.
|
|
413
|
-
def serialize(plan_value)
|
|
413
|
+
def serialize(plan_value, indent: 0, indent_unit: nil)
|
|
414
414
|
result_ptr = plan_value.result_ptr
|
|
415
415
|
status = ::FFI::MemoryPointer.new(:int)
|
|
416
|
-
raw =
|
|
417
|
-
|
|
416
|
+
raw =
|
|
417
|
+
if indent.to_i > 0
|
|
418
|
+
# libleptris 1.9.341 (leptris-ruby#425): the ext face owns
|
|
419
|
+
# the formatting; the optionless call keeps the compact
|
|
420
|
+
# historical shape.
|
|
421
|
+
opts = Leptris::XML::FFI::PlanSerializeOptions.new
|
|
422
|
+
opts[:indent] = indent.to_i
|
|
423
|
+
unit_anchor = nil
|
|
424
|
+
if indent_unit
|
|
425
|
+
unit_anchor = ::FFI::MemoryPointer.from_string(indent_unit.to_s)
|
|
426
|
+
opts[:indent_unit] = unit_anchor
|
|
427
|
+
end
|
|
428
|
+
Leptris::XML::FFI.leptris_plan_serialize_ext(
|
|
429
|
+
@handle, result_ptr, opts,
|
|
430
|
+
Leptris::XML::FFI::PlanSerializeOptions.size, status)
|
|
431
|
+
else
|
|
432
|
+
Leptris::XML::FFI.leptris_plan_serialize(
|
|
433
|
+
@handle, result_ptr, status)
|
|
434
|
+
end
|
|
418
435
|
if raw.null?
|
|
419
436
|
raise Leptris::XML::Error,
|
|
420
437
|
"plan serialize failed (status=#{status.read_int})"
|
|
@@ -422,6 +439,25 @@ class Leptris::XML::Descriptor
|
|
|
422
439
|
Leptris::XML::FFI.read_owned_string(raw)
|
|
423
440
|
end
|
|
424
441
|
|
|
442
|
+
# libleptris 1.9.341 (leptris-ruby#426): install a built result
|
|
443
|
+
# as a native document tree — build_result -> this -> the
|
|
444
|
+
# document writer, with no string round trip. Attributes carry
|
|
445
|
+
# verbatim (wire spellings); root namespace declarations ride as
|
|
446
|
+
# xmlns attributes. Only an ELEMENT root is accepted. The
|
|
447
|
+
# returned document owns its pool (GC/freed like any parsed
|
|
448
|
+
# document).
|
|
449
|
+
def to_document(plan_value)
|
|
450
|
+
result_ptr = plan_value.result_ptr
|
|
451
|
+
status = ::FFI::MemoryPointer.new(:int)
|
|
452
|
+
raw = Leptris::XML::FFI.leptris_document_from_plan_result(
|
|
453
|
+
@handle, result_ptr, status)
|
|
454
|
+
if raw.null?
|
|
455
|
+
raise Leptris::XML::Error,
|
|
456
|
+
"document from plan result failed (status=#{status.read_int})"
|
|
457
|
+
end
|
|
458
|
+
Leptris::XML::Document.wrap(raw)
|
|
459
|
+
end
|
|
460
|
+
|
|
425
461
|
# The fused loop (#1269b): source bytes → typed rows in ONE C
|
|
426
462
|
# call — leptris_plan_materialize runs parse, walk, and free
|
|
427
463
|
# natively; the returned PlanValue tree is standalone and the
|
data/lib/leptris/xml/element.rb
CHANGED
|
@@ -696,9 +696,16 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
696
696
|
# C-side version bump invalidates this document's memos.
|
|
697
697
|
if native_fast_children?
|
|
698
698
|
# The face raises on failure (TODO.perf/36); Qnil = the
|
|
699
|
-
# child needs the lift — the full path handles it.
|
|
700
|
-
|
|
701
|
-
|
|
699
|
+
# child needs the lift — the full path handles it. The
|
|
700
|
+
# return is the INSTALLED address (leptris#1636): the
|
|
701
|
+
# engine adopts cross-pool children by copy, and the
|
|
702
|
+
# wrapper must follow the installed node or it addresses
|
|
703
|
+
# the foreign original, freed with its source document.
|
|
704
|
+
installed = Leptris::XML::Native.append_binding_child(
|
|
705
|
+
@document, @c_address, node_or_markup.c_address)
|
|
706
|
+
unless installed.nil?
|
|
707
|
+
Leptris::XML::Node.rebase_installed!(node_or_markup,
|
|
708
|
+
installed, @document)
|
|
702
709
|
return node_or_markup
|
|
703
710
|
end
|
|
704
711
|
end
|
|
@@ -706,11 +713,15 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
706
713
|
unless Leptris::XML::Element.skip_adoption_lift?(node_or_markup)
|
|
707
714
|
Leptris::XML::Element.lift_namespaces_for_adoption(node_or_markup, namespaces)
|
|
708
715
|
end
|
|
709
|
-
# Address-based attach (#408):
|
|
710
|
-
#
|
|
716
|
+
# Address-based attach (#408 + leptris#1636): the installed
|
|
717
|
+
# twin returns the adopted address — rebase the wrapper when
|
|
718
|
+
# the engine copied the child out of its pool.
|
|
719
|
+
installed_out = ::FFI::MemoryPointer.new(:uint64)
|
|
711
720
|
Leptris::XML::FFI.check_status(
|
|
712
|
-
Leptris::XML::FFI.
|
|
713
|
-
@c_address, node_or_markup.c_address))
|
|
721
|
+
Leptris::XML::FFI.leptris_element_add_child_addr_installed(
|
|
722
|
+
@c_address, node_or_markup.c_address, installed_out))
|
|
723
|
+
Leptris::XML::Node.rebase_installed!(
|
|
724
|
+
node_or_markup, installed_out.read_uint64, @document)
|
|
714
725
|
node_or_markup
|
|
715
726
|
when String
|
|
716
727
|
# TODO.perf/34: one dispatch parses the markup and appends
|
data/lib/leptris/xml/ffi.rb
CHANGED
|
@@ -449,6 +449,26 @@ module Leptris
|
|
|
449
449
|
# content. Caller-freed string (leptris_free_string).
|
|
450
450
|
attach_function :leptris_plan_serialize,
|
|
451
451
|
[:leptris_plan, :leptris_plan_result, :pointer], :pointer
|
|
452
|
+
# libleptris 1.9.341 (leptris-ruby#425): formatting-bearing
|
|
453
|
+
# plan serialization. Zero-init = the compact historical
|
|
454
|
+
# form; indent > 0 pretty-prints element boundaries (one
|
|
455
|
+
# newline + indent per level, RAW/CONTENT runs verbatim
|
|
456
|
+
# inline); indent_unit replaces the two-space default
|
|
457
|
+
# (requires indent > 0). options NULL is the compact form;
|
|
458
|
+
# opts_size must cover the struct as compiled here.
|
|
459
|
+
class PlanSerializeOptions < ::FFI::Struct
|
|
460
|
+
layout :indent, :int,
|
|
461
|
+
:indent_unit, :pointer
|
|
462
|
+
end
|
|
463
|
+
attach_function :leptris_plan_serialize_ext,
|
|
464
|
+
[:leptris_plan, :leptris_plan_result, :pointer, :size_t,
|
|
465
|
+
:pointer], :pointer
|
|
466
|
+
# libleptris 1.9.341 (leptris-ruby#426): materialize a built
|
|
467
|
+
# result as a native document tree — build_result -> this ->
|
|
468
|
+
# the document writer, no string round trip. Only an ELEMENT
|
|
469
|
+
# root is accepted.
|
|
470
|
+
attach_function :leptris_document_from_plan_result,
|
|
471
|
+
[:leptris_plan, :leptris_plan_result, :pointer], :pointer
|
|
452
472
|
attach_function :leptris_plan_value_kind,
|
|
453
473
|
[:leptris_plan_result], :int
|
|
454
474
|
attach_function :leptris_plan_value_name,
|
data/lib/leptris/xml/node.rb
CHANGED
|
@@ -255,6 +255,28 @@ class Leptris::XML::Node
|
|
|
255
255
|
# structural stamps (stamped against the SOURCE version) and the
|
|
256
256
|
# source document's sibling/parent stamps. Scope-owned nodes
|
|
257
257
|
# answer nil from #document and never memoize — nothing to do.
|
|
258
|
+
# leptris#1636: after an address-based attach the engine may have
|
|
259
|
+
# adopted a cross-pool child BY COPY — the wrapper must follow the
|
|
260
|
+
# installed node, or it addresses the foreign original, freed with
|
|
261
|
+
# its source document (the Windows SEGV in fast_element_xml).
|
|
262
|
+
def self.rebase_installed!(node, installed_address, target_document)
|
|
263
|
+
return if installed_address.nil? || installed_address.zero? ||
|
|
264
|
+
installed_address == node.c_address
|
|
265
|
+
node.rebase_to(installed_address, target_document)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Point the wrapper at a different native node and forget every
|
|
269
|
+
# memo derived from the old one. The owning document follows
|
|
270
|
+
# +new_document+ (post-adoption, the node lives in the target).
|
|
271
|
+
def rebase_to(installed_address, new_document)
|
|
272
|
+
@c_address = installed_address
|
|
273
|
+
@c_ptr = nil
|
|
274
|
+
invalidate_structural_stamps!
|
|
275
|
+
@document = new_document
|
|
276
|
+
@pub_document = new_document
|
|
277
|
+
nil
|
|
278
|
+
end
|
|
279
|
+
|
|
258
280
|
def self.invalidate_cross_document!(node, target_document)
|
|
259
281
|
source = node.document
|
|
260
282
|
return if source.nil? || source.equal?(target_document)
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.342] - 2026-10-11
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **XSD lexical families: octet lengths + pattern property
|
|
8
|
+
classes (leptris-ruby#434, PR #1655).** Two gaps behind the
|
|
9
|
+
uniword corpus rejections:
|
|
10
|
+
(1) the length family counted CHARACTERS for every base -
|
|
11
|
+
XML Schema Part 2 counts OCTETS for hexBinary/base64Binary,
|
|
12
|
+
so the wml ST_LongHexNumber shape (length 4 = 4 bytes = 8
|
|
13
|
+
hex digits) rejected every canonical 8-digit rsid. The
|
|
14
|
+
restriction chain's terminal builtin now reaches the facet
|
|
15
|
+
check (hex in digits/2, base64 decoded); string-family
|
|
16
|
+
semantics unchanged.
|
|
17
|
+
(2) the OPC ST_ContentType pattern failed to PARSE - and a
|
|
18
|
+
parse failure rejects everything - missing XSD-regex
|
|
19
|
+
property classes (\p{IsBasicLatin}, \p{IsLatin-1Supplement},
|
|
20
|
+
\p{Cc}), character-class subtraction ([A-[B]]), and the
|
|
21
|
+
\t/\n/\r control escapes. Verified against the corpus's own
|
|
22
|
+
wml.xsd and opc-contentTypes.xsd; red-first specs for both.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.9.341] - 2026-10-11
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- **XSD compilation of large multi-import schemas (leptris#1644,
|
|
30
|
+
leptris-ruby#423).** `xsd_capture_root` recursed into
|
|
31
|
+
`xs:include`/`xs:import`/`xs:redefine` with no visited set —
|
|
32
|
+
`include_depth<16` bounds depth only, so a dense import DAG (every
|
|
33
|
+
OOXML schema family) was re-parsed and re-captured along every
|
|
34
|
+
path through the graph. dml-main.xsd (155 KB): >300s / 3.5GB+
|
|
35
|
+
timeout -> **0.0s / 8MB**; the "per-compile accumulation" (6.7GB
|
|
36
|
+
across sequential compiles) was allocator survival of that blowup —
|
|
37
|
+
now a 12MB plateau returned fully after each free. Each unique
|
|
38
|
+
schema unit is captured exactly once (lexically normalized path
|
|
39
|
+
key, marked before recursing so cycles close). Red-first spec
|
|
40
|
+
`ImportDagCapturesEachUnitOnce` (6-file DAG fixture).
|
|
41
|
+
- **`indent_html`: a LAST block child now nests (leptris#1647).**
|
|
42
|
+
The single-child inline rule set `mixed=1`, which the layout
|
|
43
|
+
machinery inherits down the subtree — a trailing block child
|
|
44
|
+
(body > div > p+span) glued to its parent's tag and its own
|
|
45
|
+
children fell flat. indent_html-only refinement
|
|
46
|
+
(`html_block_child_needs_lines`): a block parent whose single
|
|
47
|
+
child is itself a line-taking block breaks before its children
|
|
48
|
+
and before its close tag; `head>title` stays inline; the legacy
|
|
49
|
+
16.2 byte shape is untouched.
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- **`leptris_plan_serialize_ext` (#425, leptris-ruby#425)**:
|
|
54
|
+
formatting-bearing plan serialization — `indent` (+ optional
|
|
55
|
+
`indent_unit`) pretty-prints element boundaries; RAW/CONTENT
|
|
56
|
+
runs stay verbatim inline (the byte-exact mixed-content rule).
|
|
57
|
+
The 3-arg face is the compact default, unchanged. Options ride
|
|
58
|
+
the growable size-tagged struct pattern (#129).
|
|
59
|
+
- **`leptris_document_from_plan_result` (#426,
|
|
60
|
+
leptris-ruby#426)**: materialize a built result as a native
|
|
61
|
+
document tree — build_result → this → the document writer, no
|
|
62
|
+
string round trip. Attributes verbatim, #1626 root declarations
|
|
63
|
+
as xmlns attributes, op-order member emission (#1625's rank)
|
|
64
|
+
preserved; non-ELEMENT roots rejected.
|
|
65
|
+
- **Absorb/copy attach survival specs (leptris#1646)**: both C-level
|
|
66
|
+
attach shapes (absorb-move and adopt-by-copy) pinned as
|
|
67
|
+
`DomAbsorbSurvival.*` with post-free reads of names, text,
|
|
68
|
+
attributes, and the expanded-QName prefix/URI views — the engine
|
|
69
|
+
is ASAN-clean on both; the residual dangling is binding-side
|
|
70
|
+
(leptris-ruby#1636's wrapper rebase, landed on the binding).
|
|
71
|
+
|
|
72
|
+
## [Unreleased]
|
|
73
|
+
|
|
3
74
|
## [1.9.340] - 2026-10-11
|
|
4
75
|
|
|
5
76
|
### Added
|
|
@@ -303,6 +303,33 @@ LEPTRIS_API char* leptris_plan_serialize(LeptrisPlan plan,
|
|
|
303
303
|
const LeptrisPlanResult result,
|
|
304
304
|
LeptrisStatus* status);
|
|
305
305
|
|
|
306
|
+
/* #425: formatting-bearing plan serialization (leptris-ruby#425).
|
|
307
|
+
* Zero-initialize; every field defaults to the compact historical
|
|
308
|
+
* form. indent > 0 pretty-prints element boundaries (one newline
|
|
309
|
+
* + indent per level; RAW/CONTENT runs stay verbatim inline);
|
|
310
|
+
* indent_unit replaces the two-space default per level.
|
|
311
|
+
* options NULL = the compact form. opts_size must cover the
|
|
312
|
+
* struct as compiled by the caller (growable, #129 pattern). */
|
|
313
|
+
typedef struct {
|
|
314
|
+
int indent; /* spaces per level; 0 = compact */
|
|
315
|
+
const char* indent_unit; /* NULL = spaces; requires indent > 0 */
|
|
316
|
+
} leptris_plan_serialize_options;
|
|
317
|
+
|
|
318
|
+
LEPTRIS_API char* leptris_plan_serialize_ext(
|
|
319
|
+
LeptrisPlan plan, const LeptrisPlanResult result,
|
|
320
|
+
const leptris_plan_serialize_options* options, size_t options_size,
|
|
321
|
+
LeptrisStatus* status);
|
|
322
|
+
|
|
323
|
+
/* #426 (leptris-ruby#426): materialize a built result as a native
|
|
324
|
+
* document tree — build_result -> this -> the document writer,
|
|
325
|
+
* with no string round trip. Attributes carry verbatim (wire
|
|
326
|
+
* spellings); root namespace declarations ride as xmlns
|
|
327
|
+
* attributes. Only an ELEMENT root is accepted. Caller frees with
|
|
328
|
+
* leptris_document_free. */
|
|
329
|
+
LEPTRIS_API LeptrisDocument leptris_document_from_plan_result(
|
|
330
|
+
LeptrisPlan plan, const LeptrisPlanResult result,
|
|
331
|
+
LeptrisStatus* status);
|
|
332
|
+
|
|
306
333
|
/* ---- Result accessors (NULL-tolerant: NULL in, 0/NULL out) ------- */
|
|
307
334
|
|
|
308
335
|
LEPTRIS_API LeptrisPlanValueKind leptris_plan_value_kind(const LeptrisPlanResult v);
|