leptris 1.9.420.2 → 1.9.420.3

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: a89b7fb3ccf845ddc80256a39e826a531e5d34239786742ba3d78b0d9139017b
4
- data.tar.gz: 3e9c1d91298e19c52de0bb5317d5bb4936dd59baa109851e673f60864a238f6e
3
+ metadata.gz: ac5960331f264a627e95bb4aafd929a2efd599c427169d685af28a3d844c09e5
4
+ data.tar.gz: c63653f92afc6a142fc40877e816d53785b8cfc27cff41bd7b32fdbe0c05f90a
5
5
  SHA512:
6
- metadata.gz: e6a2da44ac55a765ef336cceeac4806950bddb334e447bdd3707233ac1c5d7a95c72f399011e78e71a62a3096f5fd716386db2e20efed62324929b81c21a9184
7
- data.tar.gz: 58bcdede282d4ea573f1d081f19322db3f3a254161065f0c9fe3da47f5a5f3ab2131d3281a0b69244de16b496a0c3b8f846f491fdd7cdb340915b3889d6685bc
6
+ metadata.gz: 4c68b0848714db7d2c3160fd1ade4ae81ad6b456fcaa9deed99ec5d4496c598d1c30e75dde68e54daef6145561f5642d69099afd4bfc64e5fd79a0cb648fb767
7
+ data.tar.gz: aec7de55dbf83e7b1710215471d1232c642918531feded58b2d8dec43b028531cfd970238e4b0c37385f398447ac659a6beb413c9903d4f3935d41d1fae727e0
@@ -83,6 +83,7 @@ static attr_first_fn f_attr_first;
83
83
  static attr_next_fn f_attr_next;
84
84
  static attr_name_fn f_attr_name;
85
85
  static attr_value_fn f_attr_value;
86
+ static const char *(*e_attr_ns_uri)(void *);
86
87
  static attr_pairs_fn f_attr_pairs;
87
88
  static node_line_fn f_node_line;
88
89
  static node_offset_fn f_node_offset;
@@ -323,6 +324,7 @@ static void resolve_symbols(const char *lib_path)
323
324
  f_attr_next = (attr_next_fn)lib_sym(h, "leptris_attribute_next");
324
325
  f_attr_name = (attr_name_fn)lib_sym(h, "leptris_attribute_get_name");
325
326
  f_attr_value = (attr_value_fn)lib_sym(h, "leptris_attribute_get_value");
327
+ e_attr_ns_uri = (const char *(*)(void *))lib_sym(h, "leptris_attribute_namespace_uri");
326
328
  f_attr_pairs = (attr_pairs_fn)lib_sym(h, "leptris_element_attribute_pairs");
327
329
  f_node_line = (node_line_fn)lib_sym(h, "leptris_node_line");
328
330
  f_node_offset = (node_offset_fn)lib_sym(h, "leptris_node_byte_offset");
@@ -1737,11 +1739,22 @@ static VALUE cc_attribute(VALUE self, VALUE name)
1737
1739
  TypedData_Get_Struct(self, struct native_node, &nn_type, n);
1738
1740
  VALUE factory = rb_attr_get(rb_obj_class(self), id_af_factory);
1739
1741
  if (NIL_P(factory)) return Qnil;
1740
- const char *v = f_attr(n->ptr, StringValueCStr(name));
1741
- if (!v) return Qnil;
1742
- return rb_funcall(factory, rb_intern("new"), 3,
1743
- rb_utf8_str_new_cstr(StringValueCStr(name)),
1744
- rb_utf8_str_new_cstr(v), self);
1742
+ const char *needle = StringValueCStr(name);
1743
+ /* Walk to the ATTRIBUTE pointer: the value comes from the
1744
+ * decode-authoritative getter and the namespace URI from the
1745
+ * attr-level face - both need the attr pointer, not the node. */
1746
+ for (void *a = f_attr_first(n->ptr); a; a = f_attr_next(a)) {
1747
+ const char *an = f_attr_name(a);
1748
+ if (!an || strcmp(an, needle) != 0) continue;
1749
+ const char *v = f_attr_value(n->ptr, a);
1750
+ if (!v) return Qnil;
1751
+ const char *uri = e_attr_ns_uri ? e_attr_ns_uri(a) : NULL;
1752
+ return rb_funcall(factory, rb_intern("new"), 4,
1753
+ rb_utf8_str_new_cstr(an),
1754
+ rb_utf8_str_new_cstr(v), self,
1755
+ uri ? rb_utf8_str_new_cstr(uri) : Qnil);
1756
+ }
1757
+ return Qnil;
1745
1758
  }
1746
1759
 
1747
1760
  static VALUE nf_bind_consumer_contract(VALUE self, VALUE klass,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.420.2"
4
+ VERSION = "1.9.420.3"
5
5
  end
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.420.2
4
+ version: 1.9.420.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-14 00:00:00.000000000 Z
11
+ date: 2026-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi