rice 4.11.0 → 4.11.2

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: f1cb911ca5d8bdd05beb12475ede38818ab53bf0af2724fb2268c7df15b10a8d
4
- data.tar.gz: dd9c953afcee173cfe9970b34dc9b91d8de5e5adf29efb262805edadad850fdb
3
+ metadata.gz: bbea336b28656bc1123b687fe1649c58c5c497cc01efafeabe7efdac71577d46
4
+ data.tar.gz: 4910c437a1e878c3c0dc534828ee89b499cf14a3d3ab4011ead2944f6063cca4
5
5
  SHA512:
6
- metadata.gz: cb66c85d175f289facdf8058d3e87cc7be957082e11cf769f2328cd175b83263733b52b8f0b5378bfb43a2244db6bf7507875bd616adacc772c317aeedd6a53a
7
- data.tar.gz: a70fe6bdfe219aac33d3645987f1bfc9bb9e1eb6dea3dc5daa6e525a4835ac0622d460518f41c46585bd5afabceb5096a027f68b1584193aded8e54995892f37
6
+ metadata.gz: 9f8f3dc946883c516c3e3e79ea11866503cd059d95765586789490c31fbd0881ed6d5fb905fd9f60120df3f2d4980a2a50bb8005d245e17feb94f85d217bbf3a
7
+ data.tar.gz: 2b69b75163ca48b82f5b11041094885d64b5c18abe0b7306912e96a94f5f986afeb968127fc7b6b3d513ee6297160adc7bd0008d1cbdfc669d0660e3aa7e8d2c
data/CHANGELOG.md CHANGED
@@ -1,14 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.11.2 (2026-02-21)
4
+
5
+ ### Enhancements
6
+
7
+ * Add support for `long double`
8
+ * Improve support for references to incomplete types
9
+
10
+ ## 4.11.1 (2026-02-18)
11
+
12
+ ### Enhancements
13
+
14
+ * Be more lenient on wrapp Qnil values in the C++ API
15
+
3
16
  ## 4.11.0 (2026-02-17)
4
17
 
5
- Enhancements:
6
- This release focuses on improving memory management:
18
+ This release focuses on improving memory management.
19
+
20
+ ### Enhancements
21
+
7
22
  * C++ API is now GC safe
8
23
  * 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
24
+ * Enable Instance Registry for Ruby owned C++ objects to avoid double frees
25
+
26
+ ### Breaking Changes
10
27
 
11
- Incompatible Changes:
12
28
  * `InstanceRegistry.isEnabled` (boolean) has been replaced by an `InstanceRegistry.isEnabled` which is an enum (`Off`, `Owned`, `All`).
13
29
  * `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
30
  * `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.
@@ -19,7 +35,8 @@ Incompatible Changes:
19
35
 
20
36
  ## 4.10.0 (2026-02-07)
21
37
 
22
- Enhancements:
38
+ ### Enhancements
39
+
23
40
  * Ruby 4.0 support
24
41
  * Support incomplete types (PIMPL/opaque handle patterns). Rice now uses `typeid(T*)` for forward-declared types that are never fully defined.
25
42
  * Support `noexcept` functions, static members, and static member functions
@@ -28,12 +45,11 @@ Enhancements:
28
45
  * Add `std::ostream`, `std::ostringstream`, and `std::ofstream`. Ruby can write to C++ streams and pass them to C++ functions. Standard streams are exposed as `Std::COUT` and `Std::CERR`.
29
46
  * Support verifying arrays of non-fundamental types (e.g., `MyClass[2]`)
30
47
  * Delegate method calls for smart pointers to their wrapped objects via method_missing?
31
-
32
- Internal:
33
48
  * Refactor type handling by merging `TypeMapper` into `TypeDetail` and simplifying class hierarchy
34
49
  * Greatly simplify define_attr
35
50
 
36
- Incompatible Changes:
51
+ ### Breaking Changes
52
+
37
53
  * `Address_Registration_Guard` has been replaced by `Pin`. If you are using `Address_Registration_Guard`
38
54
  to protect Ruby VALUEs from garbage collection, update your code to use `Pin` instead:
39
55
 
@@ -67,15 +83,18 @@ Incompatible Changes:
67
83
  * The `Data_Type<T>::define()` method has been removed. See the [Class Templates](bindings/class_templates.md) documentation for the recommended approach.
68
84
 
69
85
  ## 4.9.1 (2026-01-04)
86
+
70
87
  This release focuses on improving memory management for STL containers and attribute setters.
71
88
 
72
- Enhancements:
89
+ ### Enhancements
90
+
73
91
  * Support `takeOwnership` and `keepAlive` when setting attributes via `Arg("value").takeOwnership()` and `Arg("value").keepAlive()`
74
92
  * Add `Arg` parameter names to all STL container methods for keyword argument support
75
93
  * Add `keepAlive` support for STL container operations (vector push/insert, set insert, map/multimap store)
76
94
  * Add `keepAlive` for map/unordered_map/multimap keys to prevent GC of pointer-type keys
77
95
 
78
- Bug Fixes:
96
+ ### Fixes
97
+
79
98
  * Fix error when multiple overloaded methods take different types of vectors
80
99
  * Fix type unknown errors when using `std::shared_ptr` with g++
81
100
  * Fix CMake `_Ruby_DLEXT` variable type (string, not path)
@@ -83,6 +102,7 @@ Bug Fixes:
83
102
  * Fix incorrect attribute overloading behavior
84
103
 
85
104
  ## 4.9.0 (2026-01-01)
105
+
86
106
  This release revamps smart pointer support for `std::shared_ptr` and `std::unique_ptr`.
87
107
 
88
108
  Rice now always creates wrapper classes for smart pointers under the `Std` module (e.g., `Std::SharedPtr≺MyClass≻`, `Std::UniquePtr≺MyClass≻`). These wrapper classes expose methods like `empty?`, `get`, `swap`, and for shared_ptr, `use_count`. Methods defined on the managed type are automatically forwarded to the wrapper class using Ruby's `Forwardable` module.
@@ -90,7 +110,10 @@ Rice now always creates wrapper classes for smart pointers under the `Std` modul
90
110
  This change is backwards compatible for Ruby code but not C++ code. If you have implemented your own Smart Pointer wrapper then please read the Smart Pointer documentation for more information on how to update it.
91
111
 
92
112
  ## 4.8.0 (2025-12-29)
93
- This release focuses on making Rice easier to use:
113
+
114
+ This release focuses on making Rice easier to use.
115
+
116
+ ### Enhancements
94
117
 
95
118
  * Compilation times are approximately 2x faster than version 4.7
96
119
  * Compiled library sizes are about 30% smaller
@@ -108,7 +131,7 @@ This release focuses on making Rice easier to use:
108
131
  * Fixed Ruby detection for Homebrew installations on macOS
109
132
  * Added support for references to fundamental types
110
133
 
111
- However, these changes did require some breaking changes, which include:
134
+ ### Breaking Changes
112
135
 
113
136
  * `Return().isBuffer()` is replaced by `ReturnBuffer()`
114
137
  * `Arg("").isBuffer()` is replaced by `ArgBuffer("")`
@@ -117,13 +140,17 @@ However, these changes did require some breaking changes, which include:
117
140
  * All function/method parameter default values are verified. You may see errors like "ArgumentError: Type is not registered with Rice" or "Invalid AnyCast". In either case, make sure to check that specified default values are correct.
118
141
 
119
142
  ## 4.7.1 (2025-10-28)
120
- Updates:
143
+
144
+ ### Enhancements
145
+
121
146
  * Update overload resolution to take into account function arguments that are tagged as buffers via Arg("").setBuffer().
122
147
  * Make second parameter optional for Array#push and update docs
123
148
  * Remove ostruct runtime dependency
124
149
 
125
150
  ## 4.7.0 (2025-10-22)
126
- Updates:
151
+
152
+ ### Enhancements
153
+
127
154
  * Refactor Native wrappers - functions, methods, attributes and procs - to enable introspection API
128
155
  * Introduce Pointer<T> class to wrap pointers to fundamental types and arrays.
129
156
  * Add new methods Arg#setBuffer and Return#setBuffer to indicate that a C++ pointer references an array of objects versus a single object
@@ -141,13 +168,14 @@ Updates:
141
168
  * Correctly encode UTF8 Ruby class names in exception messages
142
169
  * Add support for disabling Ruby's global interpreter lock (GIL) when calling native functions
143
170
 
144
- Breaking Changes:
171
+ ### Breaking Changes
172
+
145
173
  * Custom implementations of From_Ruby must include a custom constructor:
146
- ```
174
+ ```cpp
147
175
  explicit From_Ruby(Arg* arg)
148
176
  ```
149
177
  * Custom implementations of To_Ruby must include a custom constructor:
150
- ```
178
+ ```cpp
151
179
  explicit To_Ruby(Return* returnInfo)
152
180
  ```
153
181
  * You can no longer pass a Buffer<T> to an API that takes a pointer. Instead use Buffer<T>#data or Buffer<T>::release
@@ -155,6 +183,7 @@ Breaking Changes:
155
183
  * Array#push requires a second argument.
156
184
 
157
185
  ## 4.6.1 (2025-06-25)
186
+
158
187
  * Improve attribute handling. Correctly deal with non-copyable/assignable attributes and return references instead of copies of objects
159
188
  * Improve Buffer implementation to deal with 4 cases:
160
189
  - array of fundamental types (int*)
@@ -165,6 +194,7 @@ Breaking Changes:
165
194
  * Fix header check on Ubuntu 22.04
166
195
 
167
196
  ## 4.6.0 (2025-06-09)
197
+
168
198
  Rice 4.6 is a major release that adds significant new functionality based on wrapping the OpenCV library, including:
169
199
 
170
200
  * Add a new Buffer class to provide Ruby API support for pointers sent to or returned by C++
@@ -188,6 +218,7 @@ Rice 4.6 is a major release that adds significant new functionality based on wra
188
218
  * Make Enums more useful by adding coerce method to enable stringing together bitwise operators - for example Season::Winter | Season::Spring | Season::Summer.
189
219
 
190
220
  ## 4.5 (2025-02-09)
221
+
191
222
  Rice 4.5 is a major release that adds significant new functionality, including:
192
223
 
193
224
  * Support method overloading
@@ -195,7 +226,7 @@ Rice 4.5 is a major release that adds significant new functionality, including:
195
226
  * Support rvalues
196
227
  * Support using keyword arguments in Ruby to call C++ methods
197
228
  * Support C style callbacks, including adding a new define_callback method
198
- * Support wrapping C/C++ functions as Ruby procs
229
+ * Support wrapping C/C++ functions as Ruby procs
199
230
  * Support calling methods that take pointers
200
231
  * Add Data_Type#define method to more easily support C++ template classes
201
232
  * Adds #define_constant method
@@ -261,7 +292,7 @@ Rice 4.1 builds on the 4.0 release and has a number of improvements that both po
261
292
 
262
293
  * Exception handlers are now registered globally versus per module. This requires updating code that calls Class#add_handler to use register_handler instead.
263
294
  * Rename Arg#isValue to Arg#setValue and then Arg#getIsValue to Arg#isValue
264
- * Rename Return#isValue to Return#setValue and Return#getIsValue to Return#isValue
295
+ * Rename Return#isValue to Return#setValue and Return#getIsValue to Return#isValue
265
296
 
266
297
  New or improved functionality includes:
267
298
 
@@ -284,7 +315,6 @@ New or improved functionality includes:
284
315
 
285
316
  Rice also includes experimental support for instance tracking so that Rice maps the same C++ instance to the same Ruby instance each time it is passed to Ruby. See the documentation for more information.
286
317
 
287
-
288
318
  ## 4.0 (2021-4-8)
289
319
 
290
320
  Rice 4.0 is a significant change from 3.0 and has multiple backwards-incompatible
@@ -330,10 +360,10 @@ There are a ton of changes, but some of the most important ones:
330
360
 
331
361
  ## 2.1.0 (2016-1-1)
332
362
 
333
- * Fix compliation issues related to g++ and Ruby 2.3.0
363
+ * Fix compliation issues related to g++ and Ruby 2.3.0.
334
364
  To do this, I had to remove Array::to_c_array which was exposing the internals of a
335
- Ruby RArray type to the system. This is not something that we should support going forward
336
- as these internals are going to change.
365
+ Ruby RArray type to the system. This is not something that we should support going forward
366
+ as these internals are going to change.
337
367
 
338
368
  ## 2.0.0 (2015-11-27)
339
369
 
@@ -350,7 +380,7 @@ There are a ton of changes, but some of the most important ones:
350
380
 
351
381
  ## 1.7.0 (2015-1-6)
352
382
 
353
- * Ruby 2.2 support
383
+ * Ruby 2.2 support.
354
384
  Potential breaking changes. Ruby 2.2 removed RHash as a public accessible struct
355
385
  and as such I changed all of the Builtin_Objects to work directly off of RObject
356
386
  instead of the specifics (RArray, RStruct, RString, etc). If you've been using these