rice 4.5.0 → 4.6.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 +23 -0
- data/CMakeLists.txt +31 -0
- data/CMakePresets.json +75 -0
- data/COPYING +3 -2
- data/FindRuby.cmake +437 -0
- data/Rakefile +5 -4
- data/include/rice/rice.hpp +5436 -3201
- data/include/rice/stl.hpp +2355 -1269
- data/lib/make_rice_headers.rb +79 -0
- data/lib/mkmf-rice.rb +4 -0
- data/lib/rice/version.rb +3 -0
- data/lib/rice.rb +1 -0
- data/lib/rubygems/builder.rb +11 -0
- data/lib/rubygems/cmake_builder.rb +113 -0
- data/lib/rubygems_plugin.rb +9 -0
- data/rice/Arg.hpp +7 -1
- data/rice/Arg.ipp +11 -2
- data/rice/Buffer.hpp +123 -0
- data/rice/Buffer.ipp +599 -0
- data/rice/Constructor.ipp +3 -3
- data/rice/Data_Object.hpp +2 -3
- data/rice/Data_Object.ipp +188 -188
- data/rice/Data_Type.hpp +4 -5
- data/rice/Data_Type.ipp +42 -26
- data/rice/Enum.hpp +0 -1
- data/rice/Enum.ipp +26 -23
- data/rice/Init.hpp +8 -0
- data/rice/Init.ipp +8 -0
- data/rice/MemoryView.ipp +1 -41
- data/rice/Return.hpp +1 -1
- data/rice/Return.ipp +6 -0
- data/rice/cpp_api/Array.hpp +209 -0
- data/rice/cpp_api/Array.ipp +304 -0
- data/rice/cpp_api/Builtin_Object.hpp +31 -0
- data/rice/cpp_api/Builtin_Object.ipp +37 -0
- data/rice/cpp_api/Class.hpp +70 -0
- data/rice/cpp_api/Class.ipp +97 -0
- data/rice/cpp_api/Encoding.hpp +32 -0
- data/rice/cpp_api/Encoding.ipp +59 -0
- data/rice/cpp_api/Hash.hpp +194 -0
- data/rice/cpp_api/Hash.ipp +257 -0
- data/rice/cpp_api/Identifier.hpp +46 -0
- data/rice/cpp_api/Identifier.ipp +31 -0
- data/rice/cpp_api/Module.hpp +72 -0
- data/rice/cpp_api/Module.ipp +101 -0
- data/rice/cpp_api/Object.hpp +272 -0
- data/rice/cpp_api/Object.ipp +235 -0
- data/rice/cpp_api/String.hpp +74 -0
- data/rice/cpp_api/String.ipp +120 -0
- data/rice/cpp_api/Struct.hpp +113 -0
- data/rice/cpp_api/Struct.ipp +92 -0
- data/rice/cpp_api/Symbol.hpp +46 -0
- data/rice/cpp_api/Symbol.ipp +93 -0
- data/rice/cpp_api/shared_methods.hpp +134 -0
- data/rice/detail/MethodInfo.hpp +1 -9
- data/rice/detail/MethodInfo.ipp +5 -72
- data/rice/detail/Native.hpp +3 -2
- data/rice/detail/Native.ipp +32 -4
- data/rice/detail/NativeAttributeGet.hpp +3 -2
- data/rice/detail/NativeAttributeGet.ipp +8 -2
- data/rice/detail/NativeAttributeSet.hpp +3 -2
- data/rice/detail/NativeAttributeSet.ipp +8 -2
- data/rice/detail/NativeCallbackFFI.ipp +1 -1
- data/rice/detail/NativeFunction.hpp +17 -6
- data/rice/detail/NativeFunction.ipp +168 -64
- data/rice/detail/NativeIterator.hpp +3 -2
- data/rice/detail/NativeIterator.ipp +8 -2
- data/rice/detail/RubyType.hpp +2 -5
- data/rice/detail/RubyType.ipp +50 -5
- data/rice/detail/Type.hpp +3 -1
- data/rice/detail/Type.ipp +61 -31
- data/rice/detail/Wrapper.hpp +68 -33
- data/rice/detail/Wrapper.ipp +103 -113
- data/rice/detail/from_ruby.hpp +5 -4
- data/rice/detail/from_ruby.ipp +737 -365
- data/rice/detail/to_ruby.ipp +1092 -186
- data/rice/global_function.ipp +1 -1
- data/rice/libc/file.hpp +11 -0
- data/rice/libc/file.ipp +32 -0
- data/rice/rice.hpp +23 -16
- data/rice/stl/complex.hpp +6 -0
- data/rice/stl/complex.ipp +93 -0
- data/rice/stl/exception.hpp +11 -0
- data/rice/stl/exception.ipp +29 -0
- data/rice/stl/exception_ptr.hpp +6 -0
- data/rice/stl/exception_ptr.ipp +27 -0
- data/rice/stl/map.hpp +12 -0
- data/rice/stl/map.ipp +469 -0
- data/rice/stl/monostate.hpp +6 -0
- data/rice/stl/monostate.ipp +80 -0
- data/rice/stl/multimap.hpp +14 -0
- data/rice/stl/multimap.ipp +448 -0
- data/rice/stl/optional.hpp +6 -0
- data/rice/stl/optional.ipp +118 -0
- data/rice/stl/pair.hpp +13 -0
- data/rice/stl/pair.ipp +155 -0
- data/rice/stl/reference_wrapper.hpp +6 -0
- data/rice/stl/reference_wrapper.ipp +41 -0
- data/rice/stl/set.hpp +12 -0
- data/rice/stl/set.ipp +495 -0
- data/rice/stl/shared_ptr.hpp +28 -0
- data/rice/stl/shared_ptr.ipp +224 -0
- data/rice/stl/string.hpp +6 -0
- data/rice/stl/string.ipp +158 -0
- data/rice/stl/string_view.hpp +6 -0
- data/rice/stl/string_view.ipp +65 -0
- data/rice/stl/tuple.hpp +6 -0
- data/rice/stl/tuple.ipp +128 -0
- data/rice/stl/type_index.hpp +6 -0
- data/rice/stl/type_index.ipp +30 -0
- data/rice/stl/type_info.hpp +6 -0
- data/rice/stl/type_info.ipp +29 -0
- data/rice/stl/unique_ptr.hpp +22 -0
- data/rice/stl/unique_ptr.ipp +139 -0
- data/rice/stl/unordered_map.hpp +12 -0
- data/rice/stl/unordered_map.ipp +469 -0
- data/rice/stl/variant.hpp +6 -0
- data/rice/stl/variant.ipp +242 -0
- data/rice/stl/vector.hpp +12 -0
- data/rice/stl/vector.ipp +590 -0
- data/rice/stl.hpp +7 -3
- data/rice/traits/attribute_traits.hpp +26 -0
- data/rice/traits/function_traits.hpp +95 -0
- data/rice/traits/method_traits.hpp +47 -0
- data/rice/traits/rice_traits.hpp +160 -0
- data/rice.gemspec +85 -0
- data/test/embed_ruby.cpp +3 -0
- data/test/ruby/test_multiple_extensions_same_class.rb +14 -14
- data/test/test_Array.cpp +6 -3
- data/test/test_Attribute.cpp +34 -1
- data/test/test_Buffer.cpp +285 -0
- data/test/test_Callback.cpp +2 -3
- data/test/test_Data_Object.cpp +88 -34
- data/test/test_Data_Type.cpp +106 -65
- data/test/test_Director.cpp +7 -3
- data/test/test_Enum.cpp +5 -2
- data/test/test_File.cpp +1 -1
- data/test/test_From_Ruby.cpp +181 -114
- data/test/test_Iterator.cpp +1 -1
- data/test/{test_JumpException.cpp → test_Jump_Exception.cpp} +1 -0
- data/test/test_Keep_Alive.cpp +7 -18
- data/test/test_Keep_Alive_No_Wrapper.cpp +0 -1
- data/test/test_Module.cpp +13 -6
- data/test/test_Native_Registry.cpp +0 -1
- data/test/test_Overloads.cpp +180 -5
- data/test/test_Ownership.cpp +100 -57
- data/test/test_Proc.cpp +0 -1
- data/test/test_Self.cpp +4 -4
- data/test/test_Stl_Map.cpp +37 -39
- data/test/test_Stl_Multimap.cpp +693 -0
- data/test/test_Stl_Pair.cpp +8 -8
- data/test/test_Stl_Reference_Wrapper.cpp +4 -2
- data/test/test_Stl_Set.cpp +790 -0
- data/test/{test_Stl_SmartPointer.cpp → test_Stl_SharedPtr.cpp} +97 -127
- data/test/test_Stl_Tuple.cpp +116 -0
- data/test/test_Stl_Type.cpp +1 -1
- data/test/test_Stl_UniquePtr.cpp +202 -0
- data/test/test_Stl_Unordered_Map.cpp +28 -34
- data/test/test_Stl_Variant.cpp +217 -89
- data/test/test_Stl_Vector.cpp +209 -83
- data/test/test_To_Ruby.cpp +373 -1
- data/test/test_Type.cpp +85 -14
- data/test/test_global_functions.cpp +17 -4
- metadata +94 -10
- data/rice/detail/TupleIterator.hpp +0 -14
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Brannan
|
8
8
|
- Jason Roelofs
|
9
9
|
- Charlie Savage
|
10
|
-
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: bundler
|
@@ -68,18 +67,30 @@ extra_rdoc_files:
|
|
68
67
|
- README.md
|
69
68
|
files:
|
70
69
|
- CHANGELOG.md
|
70
|
+
- CMakeLists.txt
|
71
|
+
- CMakePresets.json
|
71
72
|
- CONTRIBUTORS.md
|
72
73
|
- COPYING
|
74
|
+
- FindRuby.cmake
|
73
75
|
- Gemfile
|
74
76
|
- README.md
|
75
77
|
- Rakefile
|
76
78
|
- include/rice/rice.hpp
|
77
79
|
- include/rice/stl.hpp
|
80
|
+
- lib/make_rice_headers.rb
|
78
81
|
- lib/mkmf-rice.rb
|
82
|
+
- lib/rice.rb
|
83
|
+
- lib/rice/version.rb
|
84
|
+
- lib/rubygems/builder.rb
|
85
|
+
- lib/rubygems/cmake_builder.rb
|
86
|
+
- lib/rubygems_plugin.rb
|
87
|
+
- rice.gemspec
|
79
88
|
- rice/Address_Registration_Guard.hpp
|
80
89
|
- rice/Address_Registration_Guard.ipp
|
81
90
|
- rice/Arg.hpp
|
82
91
|
- rice/Arg.ipp
|
92
|
+
- rice/Buffer.hpp
|
93
|
+
- rice/Buffer.ipp
|
83
94
|
- rice/Callback.hpp
|
84
95
|
- rice/Callback.ipp
|
85
96
|
- rice/Constructor.hpp
|
@@ -93,12 +104,37 @@ files:
|
|
93
104
|
- rice/Enum.ipp
|
94
105
|
- rice/Exception.hpp
|
95
106
|
- rice/Exception.ipp
|
107
|
+
- rice/Init.hpp
|
108
|
+
- rice/Init.ipp
|
96
109
|
- rice/JumpException.hpp
|
97
110
|
- rice/JumpException.ipp
|
98
111
|
- rice/MemoryView.hpp
|
99
112
|
- rice/MemoryView.ipp
|
100
113
|
- rice/Return.hpp
|
101
114
|
- rice/Return.ipp
|
115
|
+
- rice/cpp_api/Array.hpp
|
116
|
+
- rice/cpp_api/Array.ipp
|
117
|
+
- rice/cpp_api/Builtin_Object.hpp
|
118
|
+
- rice/cpp_api/Builtin_Object.ipp
|
119
|
+
- rice/cpp_api/Class.hpp
|
120
|
+
- rice/cpp_api/Class.ipp
|
121
|
+
- rice/cpp_api/Encoding.hpp
|
122
|
+
- rice/cpp_api/Encoding.ipp
|
123
|
+
- rice/cpp_api/Hash.hpp
|
124
|
+
- rice/cpp_api/Hash.ipp
|
125
|
+
- rice/cpp_api/Identifier.hpp
|
126
|
+
- rice/cpp_api/Identifier.ipp
|
127
|
+
- rice/cpp_api/Module.hpp
|
128
|
+
- rice/cpp_api/Module.ipp
|
129
|
+
- rice/cpp_api/Object.hpp
|
130
|
+
- rice/cpp_api/Object.ipp
|
131
|
+
- rice/cpp_api/String.hpp
|
132
|
+
- rice/cpp_api/String.ipp
|
133
|
+
- rice/cpp_api/Struct.hpp
|
134
|
+
- rice/cpp_api/Struct.ipp
|
135
|
+
- rice/cpp_api/Symbol.hpp
|
136
|
+
- rice/cpp_api/Symbol.ipp
|
137
|
+
- rice/cpp_api/shared_methods.hpp
|
102
138
|
- rice/detail/DefaultHandler.hpp
|
103
139
|
- rice/detail/DefaultHandler.ipp
|
104
140
|
- rice/detail/HandlerRegistry.hpp
|
@@ -131,7 +167,6 @@ files:
|
|
131
167
|
- rice/detail/RubyFunction.ipp
|
132
168
|
- rice/detail/RubyType.hpp
|
133
169
|
- rice/detail/RubyType.ipp
|
134
|
-
- rice/detail/TupleIterator.hpp
|
135
170
|
- rice/detail/Type.hpp
|
136
171
|
- rice/detail/Type.ipp
|
137
172
|
- rice/detail/TypeRegistry.hpp
|
@@ -149,9 +184,55 @@ files:
|
|
149
184
|
- rice/forward_declares.ipp
|
150
185
|
- rice/global_function.hpp
|
151
186
|
- rice/global_function.ipp
|
187
|
+
- rice/libc/file.hpp
|
188
|
+
- rice/libc/file.ipp
|
152
189
|
- rice/rice.hpp
|
153
190
|
- rice/ruby_mark.hpp
|
154
191
|
- rice/stl.hpp
|
192
|
+
- rice/stl/complex.hpp
|
193
|
+
- rice/stl/complex.ipp
|
194
|
+
- rice/stl/exception.hpp
|
195
|
+
- rice/stl/exception.ipp
|
196
|
+
- rice/stl/exception_ptr.hpp
|
197
|
+
- rice/stl/exception_ptr.ipp
|
198
|
+
- rice/stl/map.hpp
|
199
|
+
- rice/stl/map.ipp
|
200
|
+
- rice/stl/monostate.hpp
|
201
|
+
- rice/stl/monostate.ipp
|
202
|
+
- rice/stl/multimap.hpp
|
203
|
+
- rice/stl/multimap.ipp
|
204
|
+
- rice/stl/optional.hpp
|
205
|
+
- rice/stl/optional.ipp
|
206
|
+
- rice/stl/pair.hpp
|
207
|
+
- rice/stl/pair.ipp
|
208
|
+
- rice/stl/reference_wrapper.hpp
|
209
|
+
- rice/stl/reference_wrapper.ipp
|
210
|
+
- rice/stl/set.hpp
|
211
|
+
- rice/stl/set.ipp
|
212
|
+
- rice/stl/shared_ptr.hpp
|
213
|
+
- rice/stl/shared_ptr.ipp
|
214
|
+
- rice/stl/string.hpp
|
215
|
+
- rice/stl/string.ipp
|
216
|
+
- rice/stl/string_view.hpp
|
217
|
+
- rice/stl/string_view.ipp
|
218
|
+
- rice/stl/tuple.hpp
|
219
|
+
- rice/stl/tuple.ipp
|
220
|
+
- rice/stl/type_index.hpp
|
221
|
+
- rice/stl/type_index.ipp
|
222
|
+
- rice/stl/type_info.hpp
|
223
|
+
- rice/stl/type_info.ipp
|
224
|
+
- rice/stl/unique_ptr.hpp
|
225
|
+
- rice/stl/unique_ptr.ipp
|
226
|
+
- rice/stl/unordered_map.hpp
|
227
|
+
- rice/stl/unordered_map.ipp
|
228
|
+
- rice/stl/variant.hpp
|
229
|
+
- rice/stl/variant.ipp
|
230
|
+
- rice/stl/vector.hpp
|
231
|
+
- rice/stl/vector.ipp
|
232
|
+
- rice/traits/attribute_traits.hpp
|
233
|
+
- rice/traits/function_traits.hpp
|
234
|
+
- rice/traits/method_traits.hpp
|
235
|
+
- rice/traits/rice_traits.hpp
|
155
236
|
- sample/callbacks/extconf.rb
|
156
237
|
- sample/callbacks/sample_callbacks.cpp
|
157
238
|
- sample/callbacks/test.rb
|
@@ -179,6 +260,7 @@ files:
|
|
179
260
|
- test/test_Address_Registration_Guard.cpp
|
180
261
|
- test/test_Array.cpp
|
181
262
|
- test/test_Attribute.cpp
|
263
|
+
- test/test_Buffer.cpp
|
182
264
|
- test/test_Builtin_Object.cpp
|
183
265
|
- test/test_Callback.cpp
|
184
266
|
- test/test_Class.cpp
|
@@ -194,7 +276,7 @@ files:
|
|
194
276
|
- test/test_Identifier.cpp
|
195
277
|
- test/test_Inheritance.cpp
|
196
278
|
- test/test_Iterator.cpp
|
197
|
-
- test/
|
279
|
+
- test/test_Jump_Exception.cpp
|
198
280
|
- test/test_Keep_Alive.cpp
|
199
281
|
- test/test_Keep_Alive_No_Wrapper.cpp
|
200
282
|
- test/test_Memory_Management.cpp
|
@@ -207,13 +289,17 @@ files:
|
|
207
289
|
- test/test_Self.cpp
|
208
290
|
- test/test_Stl_Exception.cpp
|
209
291
|
- test/test_Stl_Map.cpp
|
292
|
+
- test/test_Stl_Multimap.cpp
|
210
293
|
- test/test_Stl_Optional.cpp
|
211
294
|
- test/test_Stl_Pair.cpp
|
212
295
|
- test/test_Stl_Reference_Wrapper.cpp
|
213
|
-
- test/
|
296
|
+
- test/test_Stl_Set.cpp
|
297
|
+
- test/test_Stl_SharedPtr.cpp
|
214
298
|
- test/test_Stl_String.cpp
|
215
299
|
- test/test_Stl_String_View.cpp
|
300
|
+
- test/test_Stl_Tuple.cpp
|
216
301
|
- test/test_Stl_Type.cpp
|
302
|
+
- test/test_Stl_UniquePtr.cpp
|
217
303
|
- test/test_Stl_Unordered_Map.cpp
|
218
304
|
- test/test_Stl_Variant.cpp
|
219
305
|
- test/test_Stl_Vector.cpp
|
@@ -235,7 +321,6 @@ metadata:
|
|
235
321
|
changelog_uri: https://github.com/ruby-rice/rice/blob/master/CHANGELOG.md
|
236
322
|
documentation_uri: https://ruby-rice.github.io
|
237
323
|
source_code_uri: https://github.com/ruby-rice/rice
|
238
|
-
post_install_message:
|
239
324
|
rdoc_options: []
|
240
325
|
require_paths:
|
241
326
|
- lib
|
@@ -243,15 +328,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
243
328
|
requirements:
|
244
329
|
- - ">="
|
245
330
|
- !ruby/object:Gem::Version
|
246
|
-
version: '3.
|
331
|
+
version: '3.1'
|
247
332
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
333
|
requirements:
|
249
334
|
- - ">="
|
250
335
|
- !ruby/object:Gem::Version
|
251
336
|
version: '0'
|
252
337
|
requirements: []
|
253
|
-
rubygems_version: 3.
|
254
|
-
signing_key:
|
338
|
+
rubygems_version: 3.6.9
|
255
339
|
specification_version: 4
|
256
340
|
summary: Ruby Interface for C++ Extensions
|
257
341
|
test_files:
|
@@ -1,14 +0,0 @@
|
|
1
|
-
#ifndef Rice__stl__tuple_iterator__hpp_
|
2
|
-
#define Rice__stl__tuple_iterator__hpp_
|
3
|
-
|
4
|
-
// See https://www.cppstories.com/2022/tuple-iteration-apply/
|
5
|
-
template <typename Tuple_T, typename Function_T>
|
6
|
-
void for_each_tuple(Tuple_T&& tuple, Function_T&& callable)
|
7
|
-
{
|
8
|
-
std::apply([&callable](auto&& ...args)
|
9
|
-
{
|
10
|
-
(callable(std::forward<decltype(args)>(args)), ...);
|
11
|
-
}, std::forward<Tuple_T>(tuple));
|
12
|
-
}
|
13
|
-
|
14
|
-
#endif // Rice__stl__tuple_iterator__hpp_
|