leptris 1.9.193.2 → 1.9.193.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: a1403106ca3fcdf3f417fccf03e36a651e99282294f8689c793483cb8e1ae86d
4
- data.tar.gz: 0103b3de1a79e13aebf6c8f1710050857c8430696c9a4d5c5d63d186f049573c
3
+ metadata.gz: 49ef91f7ec6c9a0642a8a7663226bb98d5a1922adbb026354b9af783ab5f2821
4
+ data.tar.gz: 114f27006c38eb0949f7754b39b4428da84f6c9e5dcc67886d147ac9ac04ebfb
5
5
  SHA512:
6
- metadata.gz: 50033a452f4d59d8ae42c89b58f9fbea1a4aa8567aa75bafe04f9d4fbb5761a6a98a374799bf3c189f2f5f224d5a5ca3053d35d4cf7625f4473b459c8d3e385d
7
- data.tar.gz: 2329a71cc2a7a7c7f390ea9021b9cd18dcb1d232845f5ce03b1ebe3b0ec2afa9d0e09b3df320c7d54d9a0380428c2ceeddb336baf0884f7ba8c0c36f78cd4bbc
6
+ metadata.gz: 7ca23bf845f255e976988659785f79292fd131502b4ae04c0baaf95f813c06c22d1d57b76412ec52040e4a855cfffc3e122b82f3165a8244ae9c59e8cd1e527a
7
+ data.tar.gz: 914210f2e059b27479bad365a3f8beef6121109638dced1db909ad49869db27cceb45426630024301d1542841540c6b63db1fe703baaee56c0c7f79d78bdf7f5
@@ -5,6 +5,7 @@
5
5
  * bulk — one cache round-trip, zero Ruby frames, zero FFI
6
6
  * marshaling per node. */
7
7
  #include <ruby.h>
8
+ #include <ruby/encoding.h>
8
9
  #include <stdint.h>
9
10
  #include <string.h>
10
11
 
@@ -266,7 +267,13 @@ static VALUE nn_name(VALUE self)
266
267
  const char *s;
267
268
  TypedData_Get_Struct(self, struct native_node, &nn_type, n);
268
269
  s = f_elem_name(n->ptr);
269
- return s ? rb_utf8_str_new_cstr(s) : Qnil;
270
+ /* Interned (shared, frozen) fstring: element names repeat
271
+ * massively across a document — one RString per distinct name
272
+ * per process instead of one per read (lutaml/moxml#249:
273
+ * ~18% of consumer materialize allocations were fresh name
274
+ * strings). Names are identifiers; nothing downstream mutates
275
+ * them in place (renames mint new strings). */
276
+ return s ? rb_enc_interned_str(s, strlen(s), rb_utf8_encoding()) : Qnil;
270
277
  }
271
278
 
272
279
  static VALUE nn_content(VALUE self)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.193.2"
4
+ VERSION = "1.9.193.3"
5
5
  end
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.193.2
4
+ version: 1.9.193.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.