rice 4.10.0 → 4.11.0
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 +4 -4
- data/CHANGELOG.md +17 -0
- data/include/rice/rice.hpp +389 -375
- data/include/rice/stl.hpp +38 -11
- data/lib/rice/version.rb +1 -1
- data/rice/Constructor.ipp +7 -4
- data/rice/Data_Object.ipp +1 -1
- data/rice/Data_Type.ipp +17 -2
- data/rice/Director.hpp +3 -8
- data/rice/Director.ipp +20 -0
- data/rice/Exception.hpp +1 -2
- data/rice/Exception.ipp +5 -4
- data/rice/Pin.ipp +9 -1
- data/rice/cpp_api/Array.hpp +4 -4
- data/rice/cpp_api/Array.ipp +12 -10
- data/rice/cpp_api/Hash.hpp +3 -4
- data/rice/cpp_api/Hash.ipp +6 -5
- data/rice/cpp_api/Module.hpp +4 -5
- data/rice/cpp_api/Module.ipp +0 -4
- data/rice/cpp_api/Object.hpp +10 -19
- data/rice/cpp_api/Object.ipp +27 -35
- data/rice/cpp_api/String.hpp +2 -2
- data/rice/cpp_api/String.ipp +10 -8
- data/rice/cpp_api/Struct.hpp +2 -2
- data/rice/cpp_api/Struct.ipp +7 -5
- data/rice/detail/Anchor.hpp +2 -7
- data/rice/detail/Anchor.ipp +5 -8
- data/rice/detail/InstanceRegistry.hpp +14 -6
- data/rice/detail/InstanceRegistry.ipp +27 -25
- data/rice/detail/Wrapper.hpp +5 -3
- data/rice/detail/Wrapper.ipp +55 -35
- data/rice/detail/cpp_protect.hpp +26 -16
- data/rice/rice.hpp +6 -5
- data/rice/stl/set.ipp +14 -3
- data/rice/stl/vector.ipp +24 -8
- data/rice/traits/function_traits.hpp +8 -0
- data/rice/traits/rice_traits.hpp +12 -1
- data/test/embed_ruby.cpp +1 -2
- data/test/test_Array.cpp +30 -5
- data/test/test_Callback.cpp +1 -1
- data/test/test_Class.cpp +24 -1
- data/test/test_Data_Type.cpp +6 -32
- data/test/test_Director.cpp +82 -32
- data/test/test_Exception.cpp +1 -1
- data/test/test_Hash.cpp +10 -0
- data/test/{test_Tracking.cpp → test_Instance_Registry.cpp} +81 -16
- data/test/test_Iterator.cpp +119 -98
- data/test/test_Object.cpp +31 -11
- data/test/test_Ownership.cpp +163 -0
- data/test/test_Stl_Function.cpp +1 -1
- data/test/test_Stl_Map.cpp +35 -1
- data/test/test_Stl_Multimap.cpp +34 -0
- data/test/test_Stl_OStream.cpp +1 -3
- data/test/test_Stl_Optional.cpp +3 -3
- data/test/test_Stl_Pair.cpp +36 -1
- data/test/test_Stl_Set.cpp +71 -0
- data/test/test_Stl_Unordered_Map.cpp +35 -1
- data/test/test_Stl_Variant.cpp +3 -3
- data/test/test_Stl_Vector.cpp +121 -17
- data/test/test_Struct.cpp +3 -3
- data/test/unittest.cpp +1 -1
- metadata +3 -5
- data/rice/cpp_api/Builtin_Object.hpp +0 -31
- data/rice/cpp_api/Builtin_Object.ipp +0 -37
- data/test/test_Builtin_Object.cpp +0 -97
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1cb911ca5d8bdd05beb12475ede38818ab53bf0af2724fb2268c7df15b10a8d
|
|
4
|
+
data.tar.gz: dd9c953afcee173cfe9970b34dc9b91d8de5e5adf29efb262805edadad850fdb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb66c85d175f289facdf8058d3e87cc7be957082e11cf769f2328cd175b83263733b52b8f0b5378bfb43a2244db6bf7507875bd616adacc772c317aeedd6a53a
|
|
7
|
+
data.tar.gz: a70fe6bdfe219aac33d3645987f1bfc9bb9e1eb6dea3dc5daa6e525a4835ac0622d460518f41c46585bd5afabceb5096a027f68b1584193aded8e54995892f37
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.11.0 (2026-02-17)
|
|
4
|
+
|
|
5
|
+
Enhancements:
|
|
6
|
+
This release focuses on improving memory management:
|
|
7
|
+
* C++ API is now GC safe
|
|
8
|
+
* C++ API wrappers no longer default to rb_cObject, avoiding unintended Object changes
|
|
9
|
+
* Enable Instance Registry for Ruby owned C++ objects to avoid double frees
|
|
10
|
+
|
|
11
|
+
Incompatible Changes:
|
|
12
|
+
* `InstanceRegistry.isEnabled` (boolean) has been replaced by an `InstanceRegistry.isEnabled` which is an enum (`Off`, `Owned`, `All`).
|
|
13
|
+
* `InstanceRegistry` now defaults to `Owned` - previously it was disabled. The goal of this change is to ensure C++ objects owned by Ruby are only wrapped once to avoid double free errors.
|
|
14
|
+
* `Object()` now defaults to `Qnil` instead of `rb_cObject`. This avoids accidentally manipulating `rb_cObject` when a wrapper is not explicitly initialized. Calling methods on wrappers that point to `Qnil` will generally raise an exception. Use `object.is_nil()` to check for `nil` before using a wrapper as a receiver.
|
|
15
|
+
* C++ API wrappers now store their Ruby `VALUE` in a `Pin` instead of a raw `VALUE` field. Previously, wrappers were not GC-safe and Ruby could reclaim wrapped objects while C++ still referenced them. This is now fixed, and wrappers such as `Object` can be stored safely in containers like `std::vector`.
|
|
16
|
+
* The global `Object` constants (`Rice::Nil`, `Rice::True`, `Rice::False`, `Rice::Undef`) have been removed.
|
|
17
|
+
* `Object::test()` has been removed. Use `operator bool()` or `is_nil()` depending on the desired semantics.
|
|
18
|
+
* Remove `Builtin_Object` since it didn't serve a useful purpose
|
|
19
|
+
|
|
3
20
|
## 4.10.0 (2026-02-07)
|
|
4
21
|
|
|
5
22
|
Enhancements:
|