yoga-python 0.1.3__tar.gz → 0.1.4__tar.gz
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.
- {yoga_python-0.1.3 → yoga_python-0.1.4}/.gitignore +1 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/PKG-INFO +1 -1
- {yoga_python-0.1.3 → yoga_python-0.1.4}/pyproject.toml +1 -1
- {yoga_python-0.1.3 → yoga_python-0.1.4}/src/yoga/yoga.cpp +6 -1
- {yoga_python-0.1.3 → yoga_python-0.1.4}/uv.lock +1 -1
- {yoga_python-0.1.3 → yoga_python-0.1.4}/.github/workflows/create-release.yml +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/.github/workflows/quality.yml +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/.github/workflows/release.yml +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/.python-version +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/CMakeLists.txt +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/LICENSE +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/README.md +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/benchmarks/bench_bindings.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/pyrightconfig.json +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/src/yoga/__init__.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/src/yoga/__init__.pyi +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/src/yoga/py.typed +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/conftest.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_absolute_position.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_align_content.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_align_items.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_align_self.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_android_news_feed.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_aspect_ratio.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_auto.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_baseline.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_baseline_func.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_border.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_box_sizing.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_clone_node.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_clone_nofree.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_computed_margin.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_computed_padding.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_config.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_default_values.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_dimension.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_dirtied.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_dirty_marking.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_display.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_display_contents.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_edge.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_events.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_flex.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_flex_direction.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_flex_gap.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_flex_wrap.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_float_optional.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_free_order.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_gap.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_had_overflow.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_intrinsic_size.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_justify_content.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_layoutable_children.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_margin.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_measure.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_measure_cache.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_measure_mode.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_min_max_dimension.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_no_free.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_node_callback.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_node_child.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_ordinals.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_padding.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_percentage.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_persistence.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_persistent_node_cloning.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_relayout.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_rounding.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_rounding_function.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_rounding_measure.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_scale_change.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_size_overflow.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_small_value_buffer.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_static_position.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_style.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_style_value_pool.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_tree_mutation.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_value.py +0 -0
- {yoga_python-0.1.3 → yoga_python-0.1.4}/tests/test_zero_out_layout.py +0 -0
|
@@ -568,11 +568,13 @@ NB_MODULE(yoga, m) {
|
|
|
568
568
|
.def("__init__", [](yoga::Node *t) {
|
|
569
569
|
new (t) yoga::Node();
|
|
570
570
|
nanobindManagedNodes.insert(t);
|
|
571
|
+
node_cache_.erase(t); // evict stale cache from address reuse
|
|
571
572
|
yoga::Event::publish<yoga::Event::NodeAllocation>(t, {YGNodeGetConfig(t)});
|
|
572
573
|
})
|
|
573
574
|
.def("__init__", [](yoga::Node *t, yoga::Config* config) {
|
|
574
575
|
new (t) yoga::Node(config);
|
|
575
576
|
nanobindManagedNodes.insert(t);
|
|
577
|
+
node_cache_.erase(t); // evict stale cache from address reuse
|
|
576
578
|
yoga::Event::publish<yoga::Event::NodeAllocation>(t, {YGNodeGetConfig(t)});
|
|
577
579
|
}, nb::arg("config"))
|
|
578
580
|
.def("__len__", [](yoga::Node& self) { return YGNodeGetChildCount(&self); })
|
|
@@ -586,7 +588,10 @@ NB_MODULE(yoga, m) {
|
|
|
586
588
|
})
|
|
587
589
|
.def("free", [](yoga::Node& self) { safeNodeFree(self); })
|
|
588
590
|
.def("free_recursive", [](yoga::Node& self) { safeNodeFreeRecursive(self); })
|
|
589
|
-
.def("reset", [](yoga::Node& self) {
|
|
591
|
+
.def("reset", [](yoga::Node& self) {
|
|
592
|
+
node_cache_.erase(&self); // reset clears all styles; cache must follow
|
|
593
|
+
YGNodeReset(&self);
|
|
594
|
+
})
|
|
590
595
|
.def("copy_style", [](yoga::Node& self, const yoga::Node& src) { YGNodeCopyStyle(&self, &src); })
|
|
591
596
|
.def("set_context", [](yoga::Node& self, nb::object context) {
|
|
592
597
|
if (context.is_none()) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|