leptris 1.9.373.0-ppc64le-linux → 1.9.374.0-ppc64le-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 +4 -4
- data/Rakefile +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +18 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/dom/node_public.c +13 -2
- data/vendor-src/libleptris/src/leptris/dom/text.c +16 -2
- data/vendor-src/libleptris/src/leptris/flat/direct_parse.c +15 -2
- data/vendor-src/libleptris/test/dom/test_dom.cpp +44 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2bb66c9ad2365866d122f0d90e2b9b5615c2616809754e009d42bde404709b55
|
|
4
|
+
data.tar.gz: 5316d231e398c63e055ceff052d82898c8ccf593516600158cf92b71a9a81f42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea0fc41715d584eb1ed82583e52659155f5f48e1beb5c91b92a4d994074965f25f1933427c365e8e3db7d4bddd14b45d0cb83c081f35f9748edcd0679a3dfaff
|
|
7
|
+
data.tar.gz: db4da4fcebd8f26387754e2ce199e1a838500c76d49e9975182f41ec797fb66d11e7dcf18e0e66e1f1eac1832bb8f85bacf78b5eb62c467ee399a9a847f2b331
|
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.374"
|
|
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/lib/leptris/version.rb
CHANGED
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.374] - 2026-10-19
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **dom: detached text mutations resolve their document
|
|
8
|
+
(moxml#401, PR #1785).** `Text#content=` on a detached text node
|
|
9
|
+
— subtree removed, node unlinked, or document-level stray text —
|
|
10
|
+
failed with `Invalid argument`. Three composed gaps: the
|
|
11
|
+
document resolver's parent walk stopped at a detached ancestor
|
|
12
|
+
instead of falling through to the node's #1320 owner stamp;
|
|
13
|
+
parse-carved text nodes were never stamped at all (only the
|
|
14
|
+
public creator stamped); and lazily-promoted documents had no
|
|
15
|
+
pool at mutation time. All parsed text stamps at carve now; a
|
|
16
|
+
detached mutation promotes the document. Red-first specs
|
|
17
|
+
(`DomTextMutate.*`); 100% of 2066 ctest.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
3
21
|
## [1.9.373] - 2026-10-19
|
|
4
22
|
|
|
5
23
|
### Added
|
|
@@ -294,7 +294,13 @@ static LeptrisDocument node_public_document(LeptrisNodeRef node) {
|
|
|
294
294
|
return leptris_element_get_document((LeptrisElement)node);
|
|
295
295
|
}
|
|
296
296
|
LeptrisElement parent = leptris_node_parent(node);
|
|
297
|
-
if (parent)
|
|
297
|
+
if (parent) {
|
|
298
|
+
/* moxml#401: a DETACHED ancestor resolves to nothing — fall
|
|
299
|
+
* through to the node's own #1320 stamp instead of
|
|
300
|
+
* returning NULL from the parent's failed walk. */
|
|
301
|
+
LeptrisDocument pd = leptris_element_get_document(parent);
|
|
302
|
+
if (pd) return pd;
|
|
303
|
+
}
|
|
298
304
|
/* Issue #519: detached non-element nodes carry their owning
|
|
299
305
|
* document — mutations must work before any attach. Text was the
|
|
300
306
|
* one kind #519 skipped (its pool backref covered it until #1285
|
|
@@ -413,7 +419,12 @@ LEPTRIS_API LeptrisStatus leptris_text_node_set_content(LeptrisNodeRef node,
|
|
|
413
419
|
/* #1285 slice 4: the pool field is gone — allocate the
|
|
414
420
|
* NUL-terminated copy from the owning document's pool. */
|
|
415
421
|
LeptrisDocument doc = node_public_document(node);
|
|
416
|
-
if (!doc
|
|
422
|
+
if (!doc) return LEPTRIS_ERROR_INVALID_ARG;
|
|
423
|
+
/* TODO 139: lazily-promoted documents carry no pool until the
|
|
424
|
+
* promote runs — a detached mutation is the promote trigger
|
|
425
|
+
* (moxml#401). */
|
|
426
|
+
leptris_document_ensure_promoted(doc);
|
|
427
|
+
if (!doc->pool) return LEPTRIS_ERROR_INVALID_ARG;
|
|
417
428
|
char* copy = node_public_pool_strdup(doc->pool, content, len);
|
|
418
429
|
if (!copy) return LEPTRIS_ERROR_MEMORY;
|
|
419
430
|
leptris_textnode_set_content_ptr_doc(t, copy, len, doc);
|
|
@@ -33,7 +33,15 @@ LeptrisTextNode* leptris_text_create(const char* content,
|
|
|
33
33
|
node->base.raw = 0; /* uninitialized: see create_borrowed */
|
|
34
34
|
node->parent_off = 0;
|
|
35
35
|
node->next_sibling_off = 0;
|
|
36
|
-
|
|
36
|
+
/* moxml#401: stamp here when the doc is in hand — the #1320
|
|
37
|
+
* "only the public creator stamps" rule left every parse-carved
|
|
38
|
+
* and builder-created text unstamped, so a DETACHED text (its
|
|
39
|
+
* subtree removed) could not resolve its document for mutations
|
|
40
|
+
* (content= -> INVALID_ARG). */
|
|
41
|
+
node->owner_doc_off =
|
|
42
|
+
doc ? leptris_compact_int32_encode_doc(node, doc,
|
|
43
|
+
&node->owner_doc_off, doc)
|
|
44
|
+
: 0;
|
|
37
45
|
|
|
38
46
|
if (content && content_len > 0) {
|
|
39
47
|
memcpy(content_storage, content, content_len);
|
|
@@ -82,7 +90,13 @@ LeptrisTextNode* leptris_text_create_borrowed(const char* content,
|
|
|
82
90
|
node->content_len = (uint32_t)content_len;
|
|
83
91
|
node->parent_off = 0;
|
|
84
92
|
node->next_sibling_off = 0;
|
|
85
|
-
|
|
93
|
+
/* moxml#401: same stamp — the borrowed flavor's doc tag is
|
|
94
|
+
* MANDATORY (its content pointer needs the doc-tagged fallback
|
|
95
|
+
* anyway), so the owner resolution must have it too. */
|
|
96
|
+
node->owner_doc_off =
|
|
97
|
+
doc ? leptris_compact_int32_encode_doc(node, doc,
|
|
98
|
+
&node->owner_doc_off, doc)
|
|
99
|
+
: 0;
|
|
86
100
|
|
|
87
101
|
return node;
|
|
88
102
|
}
|
|
@@ -1326,7 +1326,15 @@ static inline LeptrisTextNode* dp_text_create(DParser* p,
|
|
|
1326
1326
|
tn->content_len = (uint32_t)content_len;
|
|
1327
1327
|
tn->parent_off = 0;
|
|
1328
1328
|
tn->next_sibling_off = 0;
|
|
1329
|
-
|
|
1329
|
+
/* moxml#401: carve-time stamp — "attach will fix it" left every
|
|
1330
|
+
* parse-carved text unstamped forever (nothing re-stamps at
|
|
1331
|
+
* attach), so a DETACHED subtree's text could not resolve its
|
|
1332
|
+
* document for mutations. */
|
|
1333
|
+
tn->owner_doc_off =
|
|
1334
|
+
p->doc ? leptris_compact_int32_encode_doc(tn, p->doc,
|
|
1335
|
+
&tn->owner_doc_off,
|
|
1336
|
+
p->doc)
|
|
1337
|
+
: 0;
|
|
1330
1338
|
return tn;
|
|
1331
1339
|
}
|
|
1332
1340
|
|
|
@@ -3227,7 +3235,12 @@ static struct leptris_document* dp_il_build(
|
|
|
3227
3235
|
* run is already NUL-terminated at carve) */
|
|
3228
3236
|
tn->parent_off = 0;
|
|
3229
3237
|
tn->next_sibling_off = 0;
|
|
3230
|
-
|
|
3238
|
+
/* moxml#401: carve-time stamp (see the text carve). */
|
|
3239
|
+
tn->owner_doc_off =
|
|
3240
|
+
doc ? leptris_compact_int32_encode_doc(tn, doc,
|
|
3241
|
+
&tn->owner_doc_off,
|
|
3242
|
+
doc)
|
|
3243
|
+
: 0;
|
|
3231
3244
|
smap[i] = (LeptrisNode*)tn;
|
|
3232
3245
|
pp.depth = (int)rdepth[r->parent] + 1;
|
|
3233
3246
|
pp.last_child_stack[pp.depth - 1] = lc[r->parent];
|
|
@@ -3386,3 +3386,47 @@ TEST(DomBasics, AttributesSnapshotEmptyAndNullContracts) {
|
|
|
3386
3386
|
|
|
3387
3387
|
leptris_document_free(doc);
|
|
3388
3388
|
}
|
|
3389
|
+
|
|
3390
|
+
/* moxml#401: Text#content= on a DETACHED text node (its subtree
|
|
3391
|
+
* removed, or the node itself unlinked) failed with INVALID_ARG —
|
|
3392
|
+
* the resolver's parent walk stopped at the detached ancestor and
|
|
3393
|
+
* the #1320 owner stamp was only set by the public creator, never
|
|
3394
|
+
* by the parse paths. Detached text mutations must reach the
|
|
3395
|
+
* owning document's pool. */
|
|
3396
|
+
TEST(DomTextMutate, DetachedSubtreeTextSetContent) {
|
|
3397
|
+
LeptrisStatus st;
|
|
3398
|
+
LeptrisDocument doc = leptris_parse_string(
|
|
3399
|
+
"<r><a>hello world</a></r>", 25, &st);
|
|
3400
|
+
ASSERT_NE(doc, nullptr);
|
|
3401
|
+
LeptrisNodeRef root = (LeptrisNodeRef)leptris_document_root(doc);
|
|
3402
|
+
ASSERT_NE(root, nullptr);
|
|
3403
|
+
LeptrisElement a = (LeptrisElement)leptris_node_first_child(root);
|
|
3404
|
+
ASSERT_NE(a, nullptr);
|
|
3405
|
+
LeptrisNodeRef t = leptris_node_first_child((LeptrisNodeRef)a);
|
|
3406
|
+
ASSERT_EQ(leptris_node_get_type(t), LEPTRIS_NODE_TYPE_TEXT);
|
|
3407
|
+
|
|
3408
|
+
/* detach the element subtree carrying the text */
|
|
3409
|
+
ASSERT_EQ(leptris_element_remove_child(
|
|
3410
|
+
(LeptrisElement)root, a),
|
|
3411
|
+
LEPTRIS_OK);
|
|
3412
|
+
EXPECT_EQ(leptris_text_node_set_content(t, "changed"), LEPTRIS_OK);
|
|
3413
|
+
const char* got = leptris_text_node_get_content(t);
|
|
3414
|
+
EXPECT_STREQ(got, "changed");
|
|
3415
|
+
leptris_document_free(doc);
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3418
|
+
TEST(DomTextMutate, DetachedTextNodeSetContent) {
|
|
3419
|
+
LeptrisStatus st;
|
|
3420
|
+
LeptrisDocument doc = leptris_parse_string(
|
|
3421
|
+
"<r><a>hello world</a></r>", 25, &st);
|
|
3422
|
+
ASSERT_NE(doc, nullptr);
|
|
3423
|
+
LeptrisNodeRef root = (LeptrisNodeRef)leptris_document_root(doc);
|
|
3424
|
+
LeptrisElement a = (LeptrisElement)leptris_node_first_child(root);
|
|
3425
|
+
LeptrisNodeRef t = leptris_node_first_child((LeptrisNodeRef)a);
|
|
3426
|
+
/* unlink JUST the text from its parent */
|
|
3427
|
+
ASSERT_EQ(leptris_element_remove_child(
|
|
3428
|
+
a, (LeptrisElement)t),
|
|
3429
|
+
LEPTRIS_OK);
|
|
3430
|
+
EXPECT_EQ(leptris_text_node_set_content(t, "solo"), LEPTRIS_OK);
|
|
3431
|
+
leptris_document_free(doc);
|
|
3432
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.374",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.374.0
|
|
5
5
|
platform: ppc64le-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|