leptris 1.9.389.0 → 1.9.390.1

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: b680bf6971424414bf522ac4190bf932da4410c0714720ef2eae721698155cb4
4
- data.tar.gz: a8dab91c683a6aa53b8a09af60340886ef1272cb0e0a990ebc87516229ec7252
3
+ metadata.gz: d6e6c09043ada2a2c494dddd8a27774b97d236807cd5f29ad41aff77b701ec38
4
+ data.tar.gz: 0724c581b91d8e2c23188166b1c43afa3d2fed60f31a6ad1ea59d75bd6958959
5
5
  SHA512:
6
- metadata.gz: 88eb1c9c78229b6188366fb0493f5a16eaae75e4c98c4a168414220f8969e90c4b7f57761fca62c57049318fbe56c5d575612a2efc90dfb4570743536d7d76b0
7
- data.tar.gz: 430d665c1fdd13b975f8ce0a63e0233ffc8b7ef46507ed3cf417ae5b4f4caca5d03f2096a8daa73f34f2775a78e5caffd281cd9ce0df68dd806a7d412f1cb715
6
+ metadata.gz: 2d40410d61fa9fec2fe0dcc20a86b9272b6e6c307315b3fc3b40d51630128fa76d394ef0f74d10b704ba0c4e185db6e6be44bd0c457d5d895f792e2a323f143b
7
+ data.tar.gz: d5594caac2e311fb307df7ef67b58dd70e9abe55d8e6e87bde2eb8417881f8b91a2a4c9453850e7ac2c74bfe021c95b79d871445dce04ef2f8ccb607e795280b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### Added — 1.9.390.1 (prebuilt-matrix ride)
4
+
5
+ - **Ruby 4.0 native bundles ship in the platform gems (#563, #554).**
6
+ The per-minor prebuilt matrix gains `native_4_0.*` per platform —
7
+ 4.0 installs engage the native layer instead of silently falling
8
+ back to FFI (the builder compiled clean under 4.0; glossarist
9
+ output verified byte-identical on the issue). Windows already
10
+ shipped `Init_native_4_0` DLLs.
11
+
12
+
3
13
  ### Changed — 1.9.389.0 (rides libleptris 1.9.389)
4
14
 
5
15
  - Engine pin 1.9.388 -> 1.9.389: the XSD content-model automaton
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.389"
11
+ LIBLEPTRIS_VERSION = "1.9.390"
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.389.0"
4
+ VERSION = "1.9.390.1"
5
5
  end
data/vendor-src/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Sources vendored in this gem (recompile rights; the ruby
2
2
  variant builds them at install via extconf.rb):
3
3
 
4
- - libleptris v1.9.389
4
+ - libleptris v1.9.390
5
5
  - utf8proc v2.11.0
6
6
 
7
7
  Rebuild by hand:
@@ -1,5 +1,18 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.9.390] - 2026-10-29
4
+
5
+ ### Fixed
6
+
7
+ - **XPath: compare `node->type` against its own enum constant
8
+ (leptris#1902).** The parent-axis attribute check (#1866,
9
+ `./@id/..`) used `LEPTRIS_NODE_ATTRIBUTE` — a constant of the
10
+ *other* internal enum — against `node->type`: same value, wrong
11
+ type. Found by the leptris-ts CI zero-warning gate (emcc
12
+ `-Wenum-compare`, wasm32 portability class).
13
+
14
+
15
+
3
16
  ## [1.9.389] - 2026-10-29
4
17
 
5
18
  ### Fixed
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(leptris
6
- VERSION 1.9.389
6
+ VERSION 1.9.390
7
7
  DESCRIPTION "Fast XML parser and XPath evaluator in pure C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -760,7 +760,7 @@ XPathNodeSet* apply_axis(XPathContext* ctx, LeptrisNode* node,
760
760
  * element). The element-typed dispatch below would read the
761
761
  * parent field in element form off the attribute struct and
762
762
  * return empty (leptris#1866, the standoc svg-uniqueids face). */
763
- if (axis_id == XPATH_AXIS_PARENT && node && node->type == LEPTRIS_NODE_ATTRIBUTE) {
763
+ if (axis_id == XPATH_AXIS_PARENT && node && node->type == LEPTRIS_NODE_TYPE_ATTRIBUTE) {
764
764
  LeptrisElement owner = ((LeptrisAttributeNode*)node)->owner;
765
765
  XPathNodeSet* result = xpath_nodeset_new();
766
766
  if (!result) return result;
@@ -974,3 +974,35 @@ TEST(ParseErrorPosition, GenericFailuresStayGeneric) {
974
974
  ASSERT_NE(err, nullptr);
975
975
  EXPECT_NE(std::strstr(err, "malformed input"), nullptr) << err;
976
976
  }
977
+
978
+ /* leptris#1901: linux-only round-trip attribute loss — sz/szCs w:val
979
+ * runs vanish between parse and serialize on x86_64-linux (uniword
980
+ * matrix: darwin green, linux red, same seed + gem versions). Pin the
981
+ * OOXML shape so the ubuntu lane arbitrates the platform split. */
982
+ TEST(RoundTrip, OoxmlRunPropertiesKeepValAttributes) {
983
+ const char xml[] =
984
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
985
+ "<w:document xmlns:w=\"http://schemas.openxmlformats.org/"
986
+ "wordprocessingml/2006/main\"><w:body><w:p><w:pPr><w:rPr>"
987
+ "<w:sz w:val=\"24\"/><w:szCs w:val=\"24\"/></w:rPr></w:pPr>"
988
+ "<w:r><w:rPr><w:sz w:val=\"24\"/><w:szCs w:val=\"24\"/>"
989
+ "</w:rPr><w:t xml:space=\"preserve\">hi there</w:t></w:r>"
990
+ "</w:p></w:body></w:document>";
991
+ LeptrisStatus st = LEPTRIS_OK;
992
+ LeptrisDocument doc =
993
+ leptris_parse_string(xml, std::strlen(xml), &st);
994
+ ASSERT_EQ(st, LEPTRIS_OK);
995
+ ASSERT_NE(doc, nullptr);
996
+ char* out = leptris_document_serialize(doc, NULL);
997
+ ASSERT_NE(out, nullptr);
998
+ /* all four w:val attributes survive the round trip */
999
+ int val_count = 0;
1000
+ for (const char* p = out; (p = std::strstr(p, "w:val=\"24\"")) != NULL;
1001
+ p++)
1002
+ val_count++;
1003
+ EXPECT_EQ(val_count, 4) << out;
1004
+ EXPECT_NE(std::strstr(out, "<w:sz w:val=\"24\"/>"), nullptr);
1005
+ EXPECT_NE(std::strstr(out, "<w:szCs w:val=\"24\"/>"), nullptr);
1006
+ leptris_free_string(out);
1007
+ leptris_document_free(doc);
1008
+ }
@@ -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.389",
4
+ "version": "1.9.390",
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.389.0
4
+ version: 1.9.390.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.