leptris 1.9.231.0-x86_64-linux → 1.9.231.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: 012e5580dc974f792458c6943f8059a5d7e3aa467a9805c7eae937f1039e5a83
4
- data.tar.gz: f0c40fc816995d4f545988578dd70f66b62844bb4ff4fd6dcb43182efb023c1f
3
+ metadata.gz: 94d963743ff31fa34fb5bf85c571ed36d17b31a357b347a9a201189d22fa1465
4
+ data.tar.gz: 7eafad3deb5589acf60f2b8985f838eeacb4d013addf7f7610a0b3e3fc3cd029
5
5
  SHA512:
6
- metadata.gz: 44c3ed7dced5f3bc3700458535e214366ca35be93ea4a8312801660598ade70c64254ad9ddf9b57c7647a3d23d28209b2ef6e61dd2e7d632d92c073c116964c8
7
- data.tar.gz: b10d3216646b6974c356e2a55384ab33985badde6e36499050427d1802730bf282c050237603bbfde6b64a72fb0df4832e9b8e37115b7d2922c7cb4e8d846442
6
+ metadata.gz: c9e85b0a1f13b0df77ceef55ca53b9931c32eee548a60076834c2a43af81ff8e72faa6ae5159402f245461d1d111340ca7feb30deeb2d52baefe3c842e2c8b77
7
+ data.tar.gz: c60c1c12fc4e695f7f696b6ebcd7cf2868ab8560990fef263728c80391aff7c77ba0ea51d1924f361d090d57204b5fbee2be385a27dfc39bf9ab2a4932f8fef0
@@ -106,6 +106,7 @@ static set_str_fn f_elem_set_name, f_elem_set_text, f_text_set_content;
106
106
  static node_unlink_fn f_node_unlink;
107
107
  static traverse_fn f_node_traverse;
108
108
  static visit_fn f_node_visit;
109
+ static visit_fn f_node_visit_entering;
109
110
  static free_str_fn f_free_str;
110
111
  static node_xpath_fn f_node_xpath;
111
112
  static elem_copy_fn f_elem_copy;
@@ -237,6 +238,10 @@ static void resolve_symbols(const char *lib_path)
237
238
  f_node_unlink = (node_unlink_fn)lib_sym(h, "leptris_node_unlink");
238
239
  f_node_traverse = (traverse_fn)lib_sym(h, "leptris_node_traverse");
239
240
  f_node_visit = (visit_fn)lib_sym(h, "leptris_node_visit");
241
+ /* Entering-only visit (leptris#1332): one callback per node —
242
+ * optional; absent engines keep the two-event visit. */
243
+ f_node_visit_entering =
244
+ (visit_fn)lib_sym(h, "leptris_node_visit_entering");
240
245
  f_free_str = (free_str_fn)lib_sym(h, "leptris_free_string");
241
246
  f_node_xpath = (node_xpath_fn)lib_sym(h, "leptris_node_get_xpath");
242
247
  f_elem_copy = (elem_copy_fn)lib_sym(h, "leptris_element_copy");
@@ -966,7 +971,10 @@ static VALUE nf_visit_binding(VALUE self, VALUE document, VALUE addr)
966
971
  st.klass_memo_flag =
967
972
  rb_obj_class(document) == c_iteration_scope ? Qfalse : Qtrue;
968
973
  st.for_visit = 1;
969
- f_node_visit(st.self_ptr, visit_cb, &st);
974
+ if (f_node_visit_entering)
975
+ f_node_visit_entering(st.self_ptr, visit_cb, &st);
976
+ else
977
+ f_node_visit(st.self_ptr, visit_cb, &st);
970
978
  if (st.err != Qnil)
971
979
  rb_exc_raise(st.err);
972
980
  return Qnil;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.231.0"
4
+ VERSION = "1.9.231.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.231.0
4
+ version: 1.9.231.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Ribose Inc.