leptris 1.9.237.0-x86_64-linux → 1.9.237.1-x86_64-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0980ce39059f99e83b70c3ed61b4321646a504f9b8215ecd20ecc6e74186bf2
4
- data.tar.gz: 90bae571c397117bf80df020632b011a992e4237b496a4239648126a70c6a18a
3
+ metadata.gz: 118128b008964bad00dec9ed6155f592be06749498e8cab6d0d5151f074d2c9a
4
+ data.tar.gz: 9040e71e461310ead4b130164c297133cba797670f578c7cc2f39c73f9cfd62b
5
5
  SHA512:
6
- metadata.gz: 1992c190b97c21cc24b0bfd3a881bf8ed4ae989e97e80ba6addb281c8834fc93ba7ea2b03cb9b00baddd1ac62c223720f7189190d3f74b44a4b2dca817db3672
7
- data.tar.gz: bb5fd9e39cb45c2aad5b363ace91319334d39c341eb4bc2894484b96db56eb8c05c4eb10b8fa310bbdfdad409bd5ebabb60d2364694776003b9db77507c59d0e
6
+ metadata.gz: 9bda865e3011cb4b83e2858412712e206a9d55a5f5321b7f8964e4f65ab976fbb4e95bf51ae2f47ea67959a4921b06eae79bd9e325557edc5789bb03db224a60
7
+ data.tar.gz: f4db1b897aea5c6d6ffcf172716d84b280bab2127c780eedca9e953ec2e3f2f8247786d348d828f161c53346a4d2b011ea66471084badf5606d9c953243244ec
@@ -2294,14 +2294,15 @@ static VALUE nf_create_element_with_attrs(VALUE self, VALUE document,
2294
2294
  VALUE parent_addr, VALUE name,
2295
2295
  VALUE attrs)
2296
2296
  {
2297
- (void)self;
2298
- (void)document;
2297
+ void *doc_ptr = NIL_P(document)
2298
+ ? NULL
2299
+ : (void *)(uintptr_t)NUM2ULL(document);
2299
2300
  void *parent = NIL_P(parent_addr)
2300
2301
  ? NULL
2301
2302
  : (void *)(uintptr_t)NUM2ULL(parent_addr);
2302
2303
  const char *cname = StringValueCStr(name);
2303
2304
 
2304
- if (f_elem_new_with_attrs && parent && RARRAY_LEN(attrs) > 0 &&
2305
+ if (f_elem_new_with_attrs && doc_ptr && parent && RARRAY_LEN(attrs) > 0 &&
2305
2306
  RARRAY_LEN(attrs) % 2 == 0) {
2306
2307
  /* Engine single-crossing construction (1.9.236+): arena
2307
2308
  * create + all attributes with no per-attr calls at all. */
@@ -2316,9 +2317,13 @@ static VALUE nf_create_element_with_attrs(VALUE self, VALUE document,
2316
2317
  names[i] = StringValueCStr(an);
2317
2318
  values[i] = StringValueCStr(av);
2318
2319
  }
2319
- void *elem = f_elem_new_with_attrs(parent, cname, names, values,
2320
- n);
2321
- return elem ? ULL2NUM((uintptr_t)elem) : Qnil;
2320
+ void *elem = f_elem_new_with_attrs(doc_ptr, cname, names,
2321
+ values, n);
2322
+ if (!elem) return Qnil;
2323
+ /* The face creates a floating element owned by the
2324
+ * document — append under the parent afterwards. */
2325
+ if (parent) f_append_child(parent, elem);
2326
+ return ULL2NUM((uintptr_t)elem);
2322
2327
  }
2323
2328
 
2324
2329
  void *elem = parent ? f_create_child(parent, cname) : NULL;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.237.0"
4
+ VERSION = "1.9.237.1"
5
5
  end
Binary file
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.237.0
4
+ version: 1.9.237.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Ribose Inc.