rice 4.2.1 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +169 -162
- data/include/rice/rice.hpp +8762 -8672
- data/include/rice/stl.hpp +128 -10
- data/lib/version.rb +3 -3
- data/rice/Data_Object.ipp +386 -313
- data/rice/Data_Type.ipp +1 -0
- data/rice/Identifier.hpp +50 -50
- data/rice/Identifier.ipp +28 -28
- data/rice/detail/NativeFunction.hpp +119 -119
- data/rice/detail/NativeFunction.ipp +300 -300
- data/rice/detail/NativeIterator.hpp +1 -1
- data/rice/detail/NativeIterator.ipp +101 -101
- data/rice/detail/Wrapper.ipp +11 -1
- data/rice/stl.hpp +1 -0
- data/test/embed_ruby.cpp +2 -2
- data/test/test_Array.cpp +301 -301
- data/test/test_Iterator.cpp +356 -290
- data/test/test_Stl_SmartPointer.cpp +45 -2
- data/test/test_Stl_String_View.cpp +88 -0
- data/test/test_Stl_Unordered_Map.cpp +38 -34
- data/test/test_Stl_Vector.cpp +871 -811
- data/test/test_String.cpp +15 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0baf33a5bd637cfffc090466cca964a6830fe3442b35c9f87d3c9da830b8fece
|
4
|
+
data.tar.gz: 7232d3fa6b895f58cfcba4e4354ad90628104db77e31e02d517f4ac15c6e882a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cb17cbb19aa2ffa783944c7fef36bc4d3a965cd0d6cdd2f935642e9bee4249e09e8ccb6b4479c12f1d4c4a9d8f6c9c03b4e64051305891ff1d68ca002a794fe
|
7
|
+
data.tar.gz: 1fc63e99c6309ab4c53dde14618ce12f72f059b3c379da5d8b62cd60cfed9ba0e81d62c6d199ef1725556a4301792b20bed4db89319af479f95ce7a3f2efd42f
|
data/CHANGELOG.md
CHANGED
@@ -1,162 +1,169 @@
|
|
1
|
-
## 4.
|
2
|
-
|
3
|
-
*
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
*
|
11
|
-
|
12
|
-
## 4.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
*
|
17
|
-
*
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
* Add support for
|
30
|
-
*
|
31
|
-
*
|
32
|
-
*
|
33
|
-
*
|
34
|
-
*
|
35
|
-
*
|
36
|
-
* Add support for
|
37
|
-
*
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
*
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
*
|
69
|
-
*
|
70
|
-
* Fix
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
*
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
*
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
*
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
*
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
*
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
*
|
1
|
+
## 4.3
|
2
|
+
* Add support for STL containers that contain pointers
|
3
|
+
* Add support for std::string_view
|
4
|
+
* Fix handling of std::shared_ptr that resulted in moving them instead of copying them
|
5
|
+
* Fix container iteration so elements are passed by reference and not copied
|
6
|
+
* Avoid unnecessary copies when creating Rice::Identifiers and Rice::Symbols
|
7
|
+
|
8
|
+
## 4.2.1
|
9
|
+
|
10
|
+
* Support systems who use `#include <experimental/filesystem>` over `#include<filesystem>`. See [#197](https://github.com/jasonroelofs/rice/issues/197) and [#201](https://github.com/jasonroelofs/rice/pull/201)
|
11
|
+
|
12
|
+
## 4.2
|
13
|
+
|
14
|
+
* Support Ruby 3.3.0.
|
15
|
+
* Split Object.call to an explicit Object.call_kw for calling methods expecting keyword arguments.
|
16
|
+
* Previously, if a wrapper used `keepAlive` on an argument or return value that was itself a Rice type, calling said method would segfault. We've now added an explicit exception to be thrown in this case, prevending the segfault and providing guidance on what was wrong and how to fix it. See [#193](https://github.com/jasonroelofs/rice/pull/193) and [#194](https://github.com/jasonroelofs/rice/pull/194)
|
17
|
+
* Fix wrapping of std::shared_ptr to properly take default arguments into account.
|
18
|
+
|
19
|
+
## 4.1
|
20
|
+
|
21
|
+
Rice 4.1 builds on the 4.0 release and has a number of improvements that both polish Rice and extend its functionality. However, there are three incompatibilities to know about:
|
22
|
+
|
23
|
+
* Exception handlers are now registered globally versus per module. This requires updating code that calls Class#add_handler to use register_handler instead.
|
24
|
+
* Rename Arg#isValue to Arg#setValue and then Arg#getIsValue to Arg#isValue
|
25
|
+
* Rename Return#isValue to Return#setValue and Return#getIsValue to Return#isValue
|
26
|
+
|
27
|
+
New or improved functionality includes:
|
28
|
+
|
29
|
+
* Add support for std::map, std::unordered_map, std::variant, std::monostate and std::reference_wrapper
|
30
|
+
* Enable calling of C++ member functions that are defined in ancestor classes
|
31
|
+
* Make it easy to wrap C++ iterators like std::vector begin and end
|
32
|
+
* Enable creating enumerators for C++ collections like std::vector and std::map
|
33
|
+
* Enable calling more Ruby API methods including those with a variable number of parameters such as rb_yield_values
|
34
|
+
* Add additional C++ to Ruby exception mappings (for example, std::system_error to SystemCallError)
|
35
|
+
* Updated documentation, including new pages for instance tracking, iterators, exceptions and newly supported STL classes
|
36
|
+
* Add support for calling Ruby methods with keywords from Rice::Object and its descendants
|
37
|
+
* Automatically translate C++ character arrays that start with colons to symbols (ie, ":mysymbol") when sending them to Ruby
|
38
|
+
* Add a constructor for Rice::Module that takes a name, to enable code like Module("Kernel")
|
39
|
+
* Fix comparison methods in Rice::Object, such as Object#is_equal, to return the correct result
|
40
|
+
* Fix various compiler warnings
|
41
|
+
* Remove deprecated APIs
|
42
|
+
* Remove support for Ruby 2.5 and 2.6 which are officially out of support
|
43
|
+
* Add support for building tests with CMake
|
44
|
+
* And lots of other fixes and code improvements
|
45
|
+
|
46
|
+
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.
|
47
|
+
|
48
|
+
|
49
|
+
## 4.0
|
50
|
+
|
51
|
+
Rice 4.0 is a significant change from 3.0 and has multiple backwards-incompatible
|
52
|
+
changes. Rice 4.0 no longer requires pre-compilation and is now a header-only library,
|
53
|
+
delivered as a combined header file.
|
54
|
+
|
55
|
+
For migrating from 3 to 4, see [the migration guide](https://jasonroelofs.com/rice/4.x/migration.html).
|
56
|
+
|
57
|
+
There are a ton of changes, but some of the most important ones:
|
58
|
+
|
59
|
+
* Header only! `#include <rice/rice.hpp>`
|
60
|
+
* Requires C++17 or later
|
61
|
+
* Brand new, expanded documentation
|
62
|
+
* [Built-in STL support](https://jasonroelofs.com/rice/4.x/stl/stl.html)
|
63
|
+
* And so much more. See the documentation for more details.
|
64
|
+
|
65
|
+
## 3.0
|
66
|
+
|
67
|
+
* Now requires a compiler supporting for C++14 or later
|
68
|
+
* Drop support for Ruby 2.4. Supported versions are now 2.5 through 3.0.
|
69
|
+
* Fix build issue on macOS Big Sur
|
70
|
+
* Fix a data corruption issue with `Rice::Exception::what`.
|
71
|
+
* Move CI from Travis to GitHub Actions. Now also able to verify Windows builds!
|
72
|
+
|
73
|
+
## 2.2.0
|
74
|
+
|
75
|
+
* Deprecate support for Rubies older than 2.4
|
76
|
+
* Provide a few more built-in to_ruby/from_ruby conversions
|
77
|
+
* Fix compilation error when building under Ruby 2.7.0
|
78
|
+
|
79
|
+
## 2.1.3
|
80
|
+
|
81
|
+
* Don't lock down HAVE_CXX11 on the Rice build itself.
|
82
|
+
|
83
|
+
## 2.1.2
|
84
|
+
|
85
|
+
* Fix defining custom `begin` and `end` methods on an `Iterator`
|
86
|
+
|
87
|
+
## 2.1.1
|
88
|
+
|
89
|
+
* Support Ruby 2.4
|
90
|
+
* Re-enable Rice::Enum#hash to support putting Enums in Hashes
|
91
|
+
|
92
|
+
## 2.1.0
|
93
|
+
|
94
|
+
* Fix compliation issues related to g++ and Ruby 2.3.0
|
95
|
+
To do this, I had to remove Array::to_c_array which was exposing the internals of a
|
96
|
+
Ruby RArray type to the system. This is not something that we should support going forward
|
97
|
+
as these internals are going to change.
|
98
|
+
|
99
|
+
# 2.0.0
|
100
|
+
|
101
|
+
* Deprecated all versions of Ruby < 2.0
|
102
|
+
* Removed Rice::VM.
|
103
|
+
Unsure if this class is even used anywhere and it felt strange to be
|
104
|
+
able to load up a Ruby interpreter inside of Ruby. If you need it, it's
|
105
|
+
two files that I can easily make available in a gist.
|
106
|
+
* Improve build process across architectures and future changes.
|
107
|
+
Included some extra warnings for XCode updates on Mac OS X.
|
108
|
+
* Confirmed that Rice definitely does not work on static Ruby builds,
|
109
|
+
but that seems to be more because newer Ruby versions don't have good static builds.
|
110
|
+
Thanks to @Kagetsuki for his help tracking down what's going on here.
|
111
|
+
|
112
|
+
## 1.7.0
|
113
|
+
|
114
|
+
* Ruby 2.2 support
|
115
|
+
Potential breaking changes. Ruby 2.2 removed RHash as a public accessible struct
|
116
|
+
and as such I changed all of the Builtin_Objects to work directly off of RObject
|
117
|
+
instead of the specifics (RArray, RStruct, RString, etc). If you've been using these
|
118
|
+
objects directly I recommend using either the Rice API or Ruby's CAPI instead for
|
119
|
+
future compatibility.
|
120
|
+
|
121
|
+
## 1.6.3
|
122
|
+
|
123
|
+
* Fix complication issue on some 64-bit *nix systems
|
124
|
+
|
125
|
+
## 1.6.2
|
126
|
+
|
127
|
+
* Oops! Missed new file in the gemspec
|
128
|
+
|
129
|
+
## 1.6.1
|
130
|
+
|
131
|
+
* Support C++x11 uniqe_ptr over auto_ptr
|
132
|
+
* Fix some warnings
|
133
|
+
|
134
|
+
## 1.6.0
|
135
|
+
|
136
|
+
* Ruby 2.1 support -- Thanks Chai Zhenhua
|
137
|
+
* Methods and Constructors have correct method access specifiers [#57]
|
138
|
+
* Clean up some 64-bit compiler warnings
|
139
|
+
|
140
|
+
## 1.5.3
|
141
|
+
|
142
|
+
* Fix signed / unsigned compiler warning with Hash#each
|
143
|
+
* Fix compilation on clang 5 (Xcode 5)
|
144
|
+
|
145
|
+
## 1.5.2
|
146
|
+
|
147
|
+
* Update build system to remove deprecation warnings and allow easier building
|
148
|
+
* Fix String to work as a parameter in a wrapped method (#59)
|
149
|
+
* Update documentation a bit
|
150
|
+
|
151
|
+
## 1.5.1
|
152
|
+
|
153
|
+
* Doc string fix
|
154
|
+
|
155
|
+
## 1.5.0
|
156
|
+
|
157
|
+
* Ruby 2.0 compatability
|
158
|
+
* Bug fixes
|
159
|
+
|
160
|
+
## 1.4.3
|
161
|
+
|
162
|
+
* Various build configuration fixes
|
163
|
+
|
164
|
+
## 1.4.0
|
165
|
+
|
166
|
+
* Fully compatible with Ruby 1.9.2
|
167
|
+
* Constructor supports default arguments
|
168
|
+
* Ability to define implicit casting through define_implicit_cast
|
169
|
+
* Fixed a few memory-related issues
|