zeroc-ice 3.8.2 → 3.8.3
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/dist/IceRuby/Communicator.cpp +26 -9
- data/dist/IceRuby/Config.h +0 -12
- data/dist/IceRuby/Connection.cpp +18 -9
- data/dist/IceRuby/DefaultSliceLoader.h +1 -1
- data/dist/IceRuby/Endpoint.cpp +21 -8
- data/dist/IceRuby/Operation.cpp +7 -5
- data/dist/IceRuby/Properties.cpp +3 -4
- data/dist/IceRuby/Proxy.cpp +11 -19
- data/dist/IceRuby/RubySliceLoader.cpp +1 -1
- data/dist/IceRuby/RubySliceLoader.h +6 -0
- data/dist/IceRuby/Types.cpp +162 -138
- data/dist/IceRuby/Types.h +68 -28
- data/dist/IceRuby/Util.cpp +14 -78
- data/dist/IceRuby/Util.h +7 -17
- data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
- data/dist/ice/cpp/include/Ice/Config.h +2 -2
- data/dist/ice/cpp/include/Ice/Connection.h +24 -8
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
- data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
- data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
- data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
- data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
- data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +5 -5
- data/dist/ice/cpp/include/Ice/Logger.h +7 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
- data/dist/ice/cpp/include/Ice/Object.h +10 -8
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
- data/dist/ice/cpp/include/Ice/OutputStream.h +7 -6
- data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
- data/dist/ice/cpp/include/Ice/Properties.h +3 -3
- data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
- data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
- data/dist/ice/cpp/include/Ice/Service.h +2 -5
- data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
- data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
- data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
- data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
- data/dist/ice/cpp/include/Ice/UUID.h +1 -0
- data/dist/ice/cpp/include/Ice/Value.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Locator.h +50 -14
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +94 -39
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Router.h +50 -14
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
- data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
- data/dist/ice/cpp/src/Ice/Base64.h +2 -2
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
- data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +94 -99
- data/dist/ice/cpp/src/Ice/ConnectionI.h +11 -8
- data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
- data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +12 -12
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +1 -3
- data/dist/ice/cpp/src/Ice/InputStream.cpp +23 -19
- data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
- data/dist/ice/cpp/src/Ice/Instance.h +1 -6
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
- data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
- data/dist/ice/cpp/src/Ice/Network.h +12 -7
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
- data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
- data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +4 -4
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
- data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
- data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
- data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
- data/dist/ice/cpp/src/Ice/Random.h +6 -2
- data/dist/ice/cpp/src/Ice/Reference.cpp +22 -11
- data/dist/ice/cpp/src/Ice/Reference.h +3 -0
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +10 -0
- data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
- data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +15 -1
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +130 -52
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +64 -33
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +3 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
- data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
- data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
- data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
- data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
- data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
- data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
- data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
- data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +4 -1
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +96 -27
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +1 -1
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +26 -20
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +2 -2
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
- data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
- data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +10 -9
- data/dist/ice/cpp/src/Slice/Parser.cpp +28 -20
- data/dist/ice/cpp/src/Slice/Parser.h +3 -4
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +3 -11
- data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -2
- data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +197 -114
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
- data/dist/ice/cpp/src/Slice/Util.h +21 -9
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +16 -12
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +3 -3
- data/dist/ice/slice/Glacier2/Router.ice +3 -3
- data/dist/ice/slice/Ice/Metrics.ice +6 -5
- data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
- data/dist/ice/slice/IceGrid/Admin.ice +9 -9
- data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
- data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
- data/dist/lib/Glacier2/Metrics.rb +1 -1
- data/dist/lib/Glacier2/PermissionsVerifier.rb +1 -1
- data/dist/lib/Glacier2/Router.rb +2 -2
- data/dist/lib/Glacier2/SSLInfo.rb +1 -1
- data/dist/lib/Glacier2/Session.rb +1 -1
- data/dist/lib/Ice/BuiltinSequences.rb +1 -1
- data/dist/lib/Ice/CompressBatch.rb +1 -2
- data/dist/lib/Ice/Context.rb +1 -1
- data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
- data/dist/lib/Ice/EndpointTypes.rb +1 -1
- data/dist/lib/Ice/Identity.rb +1 -1
- data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
- data/dist/lib/Ice/Locator.rb +1 -1
- data/dist/lib/Ice/LocatorRegistry.rb +1 -1
- data/dist/lib/Ice/Metrics.rb +1 -1
- data/dist/lib/Ice/OperationMode.rb +2 -3
- data/dist/lib/Ice/Process.rb +1 -1
- data/dist/lib/Ice/PropertiesAdmin.rb +1 -1
- data/dist/lib/Ice/PropertyDict.rb +1 -1
- data/dist/lib/Ice/RemoteLogger.rb +2 -3
- data/dist/lib/Ice/ReplyStatus.rb +2 -3
- data/dist/lib/Ice/Router.rb +1 -1
- data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
- data/dist/lib/Ice/SliceUtil.rb +2 -2
- data/dist/lib/Ice/Struct.rb +1 -0
- data/dist/lib/Ice/ToStringMode.rb +1 -2
- data/dist/lib/Ice/Value.rb +2 -2
- data/dist/lib/Ice/Version.rb +1 -1
- data/dist/lib/IceBox/ServiceManager.rb +1 -1
- data/dist/lib/IceGrid/Admin.rb +3 -4
- data/dist/lib/IceGrid/Descriptor.rb +1 -1
- data/dist/lib/IceGrid/Exception.rb +1 -1
- data/dist/lib/IceGrid/FileParser.rb +1 -1
- data/dist/lib/IceGrid/Registry.rb +2 -3
- data/dist/lib/IceGrid/Session.rb +2 -2
- data/dist/lib/IceGrid/UserAccountMapper.rb +1 -1
- data/dist/lib/IceStorm/IceStorm.rb +1 -1
- data/dist/lib/IceStorm/Metrics.rb +1 -1
- data/extconf.rb +1 -1
- data/ice.gemspec +3 -3
- metadata +4 -5
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
- data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a605837988ce25b7b58d46ea460f0c286a95530140d5f23e3af035c6f151b33
|
|
4
|
+
data.tar.gz: 0e3ad2c032e729a00b19ee324a8b11f6da47d774c57bd6f364765fc0d4c1348b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e35197c1bec028fc5c27926658a61babf5c69738438ab2e68f44f7aa8fcd039de7196cc00d75af96bbf3b4ac7084b0b0b671a325beefe3bf29c0fe3e2eb0949
|
|
7
|
+
data.tar.gz: 2e0d8a8a6a3200e4450c798d28d496f45d9829fb94221b0e8512faad52b8de1c89de34492872605d3980fb65a4da0f6f133de9befe637cb836735c1ba7365b21
|
|
@@ -28,7 +28,24 @@ namespace
|
|
|
28
28
|
extern "C" void
|
|
29
29
|
IceRuby_Communicator_free(void* p)
|
|
30
30
|
{
|
|
31
|
-
|
|
31
|
+
// The wrapper is collected only once no other object (such as a proxy) marks it. Erase the map
|
|
32
|
+
// entries so that the native communicator and slice loader can be released.
|
|
33
|
+
auto communicator = static_cast<Ice::CommunicatorPtr*>(p);
|
|
34
|
+
_communicatorMap.erase(*communicator);
|
|
35
|
+
_sliceLoaderMap.erase(*communicator);
|
|
36
|
+
delete communicator;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
extern "C" void
|
|
40
|
+
IceRuby_Communicator_compact(void* p)
|
|
41
|
+
{
|
|
42
|
+
// Keep the map entry pointing at the wrapper's current location when GC compaction moves it.
|
|
43
|
+
auto communicator = static_cast<Ice::CommunicatorPtr*>(p);
|
|
44
|
+
CommunicatorMap::iterator q = _communicatorMap.find(*communicator);
|
|
45
|
+
if (q != _communicatorMap.end())
|
|
46
|
+
{
|
|
47
|
+
q->second = rb_gc_location(q->second);
|
|
48
|
+
}
|
|
32
49
|
}
|
|
33
50
|
|
|
34
51
|
static const rb_data_type_t IceRuby_CommunicatorType = {
|
|
@@ -36,6 +53,7 @@ static const rb_data_type_t IceRuby_CommunicatorType = {
|
|
|
36
53
|
.function =
|
|
37
54
|
{
|
|
38
55
|
.dfree = IceRuby_Communicator_free,
|
|
56
|
+
.dcompact = IceRuby_Communicator_compact,
|
|
39
57
|
},
|
|
40
58
|
.flags = RUBY_TYPED_FREE_IMMEDIATELY,
|
|
41
59
|
};
|
|
@@ -158,11 +176,6 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE /*self*/)
|
|
|
158
176
|
&IceRuby_CommunicatorType,
|
|
159
177
|
new Ice::CommunicatorPtr(communicator));
|
|
160
178
|
|
|
161
|
-
CommunicatorMap::iterator p = _communicatorMap.find(communicator);
|
|
162
|
-
if (p != _communicatorMap.end())
|
|
163
|
-
{
|
|
164
|
-
_communicatorMap.erase(p);
|
|
165
|
-
}
|
|
166
179
|
_communicatorMap.insert(CommunicatorMap::value_type(communicator, reinterpret_cast<const VALUE&>(result)));
|
|
167
180
|
|
|
168
181
|
_sliceLoaderMap[communicator] = sliceLoader;
|
|
@@ -223,8 +236,12 @@ IceRuby_identityToString(int argc, VALUE* argv, VALUE /*self*/)
|
|
|
223
236
|
if (argc == 2)
|
|
224
237
|
{
|
|
225
238
|
volatile VALUE modeValue = callRuby(rb_funcall, argv[1], rb_intern("to_i"), 0);
|
|
226
|
-
|
|
227
|
-
|
|
239
|
+
int32_t mode = getInteger(modeValue);
|
|
240
|
+
if (mode < 0 || mode > static_cast<int32_t>(Ice::ToStringMode::Compat))
|
|
241
|
+
{
|
|
242
|
+
throw RubyException(rb_eRangeError, "invalid enumerator %d for enum Ice::ToStringMode", mode);
|
|
243
|
+
}
|
|
244
|
+
toStringMode = static_cast<Ice::ToStringMode>(mode);
|
|
228
245
|
}
|
|
229
246
|
|
|
230
247
|
string str = Ice::identityToString(ident, toStringMode);
|
|
@@ -386,7 +403,7 @@ IceRuby_Communicator_getImplicitContext(VALUE self)
|
|
|
386
403
|
{
|
|
387
404
|
Ice::CommunicatorPtr p = getCommunicator(self);
|
|
388
405
|
Ice::ImplicitContextPtr implicitContext = p->getImplicitContext();
|
|
389
|
-
return createImplicitContext(implicitContext);
|
|
406
|
+
return implicitContext ? createImplicitContext(implicitContext) : Qnil;
|
|
390
407
|
}
|
|
391
408
|
ICE_RUBY_CATCH
|
|
392
409
|
return Qnil;
|
data/dist/IceRuby/Config.h
CHANGED
|
@@ -55,18 +55,6 @@
|
|
|
55
55
|
# pragma GCC diagnostic pop
|
|
56
56
|
#endif
|
|
57
57
|
|
|
58
|
-
//
|
|
59
|
-
// The Ruby header file win32/win32.h defines a number of macros for
|
|
60
|
-
// functions like shutdown() and close() that wreak havoc.
|
|
61
|
-
//
|
|
62
|
-
#ifdef _WIN32
|
|
63
|
-
# undef shutdown
|
|
64
|
-
# undef close
|
|
65
|
-
# undef read
|
|
66
|
-
# undef write
|
|
67
|
-
# undef sleep
|
|
68
|
-
#endif
|
|
69
|
-
|
|
70
58
|
extern "C"
|
|
71
59
|
{
|
|
72
60
|
typedef VALUE (*ICE_RUBY_ENTRY_POINT)(...);
|
data/dist/IceRuby/Connection.cpp
CHANGED
|
@@ -148,10 +148,7 @@ IceRuby_Connection_setBufferSize(VALUE self, VALUE r, VALUE s)
|
|
|
148
148
|
Ice::ConnectionPtr* p = reinterpret_cast<Ice::ConnectionPtr*>(DATA_PTR(self));
|
|
149
149
|
assert(p);
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
int sndSize = static_cast<int>(getInteger(s));
|
|
153
|
-
|
|
154
|
-
(*p)->setBufferSize(rcvSize, sndSize);
|
|
151
|
+
(*p)->setBufferSize(getInteger(r), getInteger(s));
|
|
155
152
|
}
|
|
156
153
|
ICE_RUBY_CATCH
|
|
157
154
|
return Qnil;
|
|
@@ -191,14 +188,11 @@ IceRuby_Connection_equals(VALUE self, VALUE other)
|
|
|
191
188
|
{
|
|
192
189
|
ICE_RUBY_TRY
|
|
193
190
|
{
|
|
194
|
-
|
|
191
|
+
// eql? returns false for a non-Connection argument: Ruby calls it with arbitrary keys on a Hash collision.
|
|
192
|
+
if (NIL_P(other) || callRuby(rb_obj_is_kind_of, other, _connectionClass) != Qtrue)
|
|
195
193
|
{
|
|
196
194
|
return Qfalse;
|
|
197
195
|
}
|
|
198
|
-
if (callRuby(rb_obj_is_kind_of, other, _connectionClass) != Qtrue)
|
|
199
|
-
{
|
|
200
|
-
throw RubyException(rb_eTypeError, "argument must be a connection");
|
|
201
|
-
}
|
|
202
196
|
Ice::ConnectionPtr* p1 = reinterpret_cast<Ice::ConnectionPtr*>(DATA_PTR(self));
|
|
203
197
|
Ice::ConnectionPtr* p2 = reinterpret_cast<Ice::ConnectionPtr*>(DATA_PTR(other));
|
|
204
198
|
return *p1 == *p2 ? Qtrue : Qfalse;
|
|
@@ -207,6 +201,19 @@ IceRuby_Connection_equals(VALUE self, VALUE other)
|
|
|
207
201
|
return Qnil;
|
|
208
202
|
}
|
|
209
203
|
|
|
204
|
+
extern "C" VALUE
|
|
205
|
+
IceRuby_Connection_hash(VALUE self)
|
|
206
|
+
{
|
|
207
|
+
ICE_RUBY_TRY
|
|
208
|
+
{
|
|
209
|
+
Ice::ConnectionPtr* p = reinterpret_cast<Ice::ConnectionPtr*>(DATA_PTR(self));
|
|
210
|
+
// Hash the native pointer, which is exactly what eql? compares.
|
|
211
|
+
return INT2FIX(std::hash<Ice::ConnectionPtr>{}(*p));
|
|
212
|
+
}
|
|
213
|
+
ICE_RUBY_CATCH
|
|
214
|
+
return Qnil;
|
|
215
|
+
}
|
|
216
|
+
|
|
210
217
|
// ConnectionInfo
|
|
211
218
|
|
|
212
219
|
extern "C" void
|
|
@@ -303,6 +310,7 @@ IceRuby::createConnectionInfo(const Ice::ConnectionInfoPtr& p)
|
|
|
303
310
|
rb_ivar_set(info, rb_intern("@underlying"), createConnectionInfo(p->underlying));
|
|
304
311
|
rb_ivar_set(info, rb_intern("@incoming"), p->incoming ? Qtrue : Qfalse);
|
|
305
312
|
rb_ivar_set(info, rb_intern("@adapterName"), createString(p->adapterName));
|
|
313
|
+
rb_ivar_set(info, rb_intern("@connectionId"), createString(p->connectionId));
|
|
306
314
|
return info;
|
|
307
315
|
}
|
|
308
316
|
|
|
@@ -336,6 +344,7 @@ IceRuby::initConnection(VALUE iceModule)
|
|
|
336
344
|
rb_define_method(_connectionClass, "inspect", CAST_METHOD(IceRuby_Connection_toString), 0);
|
|
337
345
|
rb_define_method(_connectionClass, "==", CAST_METHOD(IceRuby_Connection_equals), 1);
|
|
338
346
|
rb_define_method(_connectionClass, "eql?", CAST_METHOD(IceRuby_Connection_equals), 1);
|
|
347
|
+
rb_define_method(_connectionClass, "hash", CAST_METHOD(IceRuby_Connection_hash), 0);
|
|
339
348
|
|
|
340
349
|
//
|
|
341
350
|
// ConnectionInfo.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
namespace IceRuby
|
|
10
10
|
{
|
|
11
|
-
/// Instantiates generated
|
|
11
|
+
/// Instantiates generated Ruby classes/exceptions based on the Slice type ID.
|
|
12
12
|
class DefaultSliceLoader final : public Ice::SliceLoader
|
|
13
13
|
{
|
|
14
14
|
public:
|
data/dist/IceRuby/Endpoint.cpp
CHANGED
|
@@ -76,13 +76,9 @@ IceRuby_Endpoint_cmp(VALUE self, VALUE other)
|
|
|
76
76
|
{
|
|
77
77
|
ICE_RUBY_TRY
|
|
78
78
|
{
|
|
79
|
-
if (NIL_P(other))
|
|
80
|
-
{
|
|
81
|
-
return INT2NUM(1);
|
|
82
|
-
}
|
|
83
79
|
if (!checkEndpoint(other))
|
|
84
80
|
{
|
|
85
|
-
|
|
81
|
+
return Qnil;
|
|
86
82
|
}
|
|
87
83
|
Ice::EndpointPtr p1 = Ice::EndpointPtr(*reinterpret_cast<Ice::EndpointPtr*>(DATA_PTR(self)));
|
|
88
84
|
Ice::EndpointPtr p2 = Ice::EndpointPtr(*reinterpret_cast<Ice::EndpointPtr*>(DATA_PTR(other)));
|
|
@@ -90,7 +86,7 @@ IceRuby_Endpoint_cmp(VALUE self, VALUE other)
|
|
|
90
86
|
{
|
|
91
87
|
return INT2NUM(-1);
|
|
92
88
|
}
|
|
93
|
-
else if (Ice::targetEqualTo(p1,
|
|
89
|
+
else if (Ice::targetEqualTo(p1, p2))
|
|
94
90
|
{
|
|
95
91
|
return INT2NUM(0);
|
|
96
92
|
}
|
|
@@ -109,6 +105,22 @@ IceRuby_Endpoint_equals(VALUE self, VALUE other)
|
|
|
109
105
|
return IceRuby_Endpoint_cmp(self, other) == INT2NUM(0) ? Qtrue : Qfalse;
|
|
110
106
|
}
|
|
111
107
|
|
|
108
|
+
extern "C" VALUE
|
|
109
|
+
IceRuby_Endpoint_hash(VALUE self)
|
|
110
|
+
{
|
|
111
|
+
ICE_RUBY_TRY
|
|
112
|
+
{
|
|
113
|
+
Ice::EndpointPtr* p = reinterpret_cast<Ice::EndpointPtr*>(DATA_PTR(self));
|
|
114
|
+
assert(p);
|
|
115
|
+
|
|
116
|
+
// Hash the string representation, which encodes exactly the fields used by operator== (and hence eql?),
|
|
117
|
+
// so equal endpoints produce equal hashes.
|
|
118
|
+
return INT2FIX(std::hash<string>{}((*p)->toString()));
|
|
119
|
+
}
|
|
120
|
+
ICE_RUBY_CATCH
|
|
121
|
+
return Qnil;
|
|
122
|
+
}
|
|
123
|
+
|
|
112
124
|
// EndpointInfo
|
|
113
125
|
|
|
114
126
|
extern "C" void
|
|
@@ -159,8 +171,8 @@ IceRuby::createEndpointInfo(const Ice::EndpointInfoPtr& p)
|
|
|
159
171
|
info = TypedData_Wrap_Struct(_opaqueEndpointInfoClass, &IceRuby_EndpointInfoType, new Ice::EndpointInfoPtr(p));
|
|
160
172
|
|
|
161
173
|
Ice::OpaqueEndpointInfoPtr opaque = dynamic_pointer_cast<Ice::OpaqueEndpointInfo>(p);
|
|
162
|
-
auto b = opaque->rawBytes;
|
|
163
|
-
volatile VALUE v = callRuby(rb_str_new, reinterpret_cast<const char*>(
|
|
174
|
+
const auto& b = opaque->rawBytes;
|
|
175
|
+
volatile VALUE v = callRuby(rb_str_new, reinterpret_cast<const char*>(b.data()), static_cast<long>(b.size()));
|
|
164
176
|
rb_ivar_set(info, rb_intern("@rawBytes"), v);
|
|
165
177
|
rb_ivar_set(info, rb_intern("@rawEncoding"), createEncodingVersion(opaque->rawEncoding));
|
|
166
178
|
}
|
|
@@ -254,6 +266,7 @@ IceRuby::initEndpoint(VALUE iceModule)
|
|
|
254
266
|
rb_define_method(_endpointClass, "<=>", CAST_METHOD(IceRuby_Endpoint_cmp), 1);
|
|
255
267
|
rb_define_method(_endpointClass, "==", CAST_METHOD(IceRuby_Endpoint_equals), 1);
|
|
256
268
|
rb_define_method(_endpointClass, "eql?", CAST_METHOD(IceRuby_Endpoint_equals), 1);
|
|
269
|
+
rb_define_method(_endpointClass, "hash", CAST_METHOD(IceRuby_Endpoint_hash), 0);
|
|
257
270
|
|
|
258
271
|
//
|
|
259
272
|
// EndpointInfo.
|
data/dist/IceRuby/Operation.cpp
CHANGED
|
@@ -25,7 +25,7 @@ namespace IceRuby
|
|
|
25
25
|
class ParamInfo final : public UnmarshalCallback
|
|
26
26
|
{
|
|
27
27
|
public:
|
|
28
|
-
void unmarshaled(VALUE, VALUE, void*) final;
|
|
28
|
+
void unmarshaled(VALUE, VALUE, void*, StreamUtil*) final;
|
|
29
29
|
|
|
30
30
|
TypeInfoPtr type;
|
|
31
31
|
bool optional;
|
|
@@ -146,7 +146,7 @@ IceRuby::Operation::~Operation() = default;
|
|
|
146
146
|
// ParamInfo implementation.
|
|
147
147
|
//
|
|
148
148
|
void
|
|
149
|
-
IceRuby::ParamInfo::unmarshaled(VALUE val, VALUE target, void* closure)
|
|
149
|
+
IceRuby::ParamInfo::unmarshaled(VALUE val, VALUE target, void* closure, StreamUtil*)
|
|
150
150
|
{
|
|
151
151
|
assert(TYPE(target) == T_ARRAY);
|
|
152
152
|
static_assert(sizeof(long) == sizeof(void*), "long and void* must have the same size");
|
|
@@ -267,7 +267,9 @@ IceRuby::OperationI::invoke(const Ice::ObjectPrx& proxy, VALUE args, VALUE hctx)
|
|
|
267
267
|
|
|
268
268
|
if (!_deprecateMessage.empty())
|
|
269
269
|
{
|
|
270
|
-
rb_warning
|
|
270
|
+
// Route the warning through the rb_protect discipline: rb_warning dispatches to the overridable
|
|
271
|
+
// Warning.warn, and a raising override would otherwise longjmp past the live C++ locals above.
|
|
272
|
+
callRubyVoid([this] { rb_warning("%s", _deprecateMessage.c_str()); });
|
|
271
273
|
_deprecateMessage.clear(); // Only show the warning once.
|
|
272
274
|
}
|
|
273
275
|
|
|
@@ -366,7 +368,7 @@ IceRuby::OperationI::convertParam(VALUE v, long pos)
|
|
|
366
368
|
ParamInfoPtr param = make_shared<ParamInfo>();
|
|
367
369
|
param->type = getType(RARRAY_AREF(v, 0));
|
|
368
370
|
param->optional = static_cast<bool>(RTEST(RARRAY_AREF(v, 1)));
|
|
369
|
-
param->tag =
|
|
371
|
+
param->tag = getInteger(RARRAY_AREF(v, 2));
|
|
370
372
|
param->pos = static_cast<int>(pos);
|
|
371
373
|
return param;
|
|
372
374
|
}
|
|
@@ -467,7 +469,7 @@ IceRuby::OperationI::unmarshalResults(const vector<byte>& bytes, const Ice::Comm
|
|
|
467
469
|
|
|
468
470
|
//
|
|
469
471
|
// Unmarshal the results. If there is more than one value to be returned, then return them
|
|
470
|
-
// in
|
|
472
|
+
// in an array of the form [result, outParam1, ...]. Otherwise just return the value.
|
|
471
473
|
//
|
|
472
474
|
Ice::InputStream is{communicator, bytes, lookupSliceLoader(communicator)};
|
|
473
475
|
|
data/dist/IceRuby/Properties.cpp
CHANGED
|
@@ -37,9 +37,9 @@ IceRuby_createProperties(int argc, VALUE* argv, VALUE /*self*/)
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
Ice::PropertiesPtr defaults;
|
|
40
|
-
if (argc == 2)
|
|
40
|
+
if (argc == 2 && !NIL_P(argv[1]))
|
|
41
41
|
{
|
|
42
|
-
if (
|
|
42
|
+
if (callRuby(rb_obj_is_instance_of, argv[1], _propertiesClass) == Qfalse)
|
|
43
43
|
{
|
|
44
44
|
throw RubyException(rb_eTypeError, "invalid properties argument to Ice::createProperties");
|
|
45
45
|
}
|
|
@@ -156,8 +156,7 @@ IceRuby_Properties_getPropertyAsIntWithDefault(VALUE self, VALUE key, VALUE def)
|
|
|
156
156
|
{
|
|
157
157
|
Ice::PropertiesPtr p = getProperties(self);
|
|
158
158
|
string k = getString(key);
|
|
159
|
-
int32_t
|
|
160
|
-
int32_t v = p->getPropertyAsIntWithDefault(k, d);
|
|
159
|
+
int32_t v = p->getPropertyAsIntWithDefault(k, getInteger(def));
|
|
161
160
|
return INT2FIX(v);
|
|
162
161
|
}
|
|
163
162
|
ICE_RUBY_CATCH
|
data/dist/IceRuby/Proxy.cpp
CHANGED
|
@@ -248,7 +248,7 @@ IceRuby_ObjectPrx_ice_endpoints(VALUE self, VALUE seq)
|
|
|
248
248
|
if (!NIL_P(seq))
|
|
249
249
|
{
|
|
250
250
|
volatile VALUE arr = callRuby(rb_check_array_type, seq);
|
|
251
|
-
if (NIL_P(
|
|
251
|
+
if (NIL_P(arr))
|
|
252
252
|
{
|
|
253
253
|
throw RubyException(rb_eTypeError, "unable to convert value to an array of endpoints");
|
|
254
254
|
}
|
|
@@ -316,8 +316,7 @@ IceRuby_ObjectPrx_ice_locatorCacheTimeout(VALUE self, VALUE timeout)
|
|
|
316
316
|
try
|
|
317
317
|
{
|
|
318
318
|
Ice::ObjectPrx p = getProxy(self);
|
|
319
|
-
|
|
320
|
-
return createProxy(p->ice_locatorCacheTimeout(static_cast<int32_t>(t)), rb_class_of(self));
|
|
319
|
+
return createProxy(p->ice_locatorCacheTimeout(getInteger(timeout)), rb_class_of(self));
|
|
321
320
|
}
|
|
322
321
|
catch (const invalid_argument& ex)
|
|
323
322
|
{
|
|
@@ -336,8 +335,7 @@ IceRuby_ObjectPrx_ice_invocationTimeout(VALUE self, VALUE timeout)
|
|
|
336
335
|
try
|
|
337
336
|
{
|
|
338
337
|
Ice::ObjectPrx p = getProxy(self);
|
|
339
|
-
|
|
340
|
-
return createProxy(p->ice_invocationTimeout(static_cast<int32_t>(t)), rb_class_of(self));
|
|
338
|
+
return createProxy(p->ice_invocationTimeout(getInteger(timeout)), rb_class_of(self));
|
|
341
339
|
}
|
|
342
340
|
catch (const invalid_argument& ex)
|
|
343
341
|
{
|
|
@@ -425,17 +423,15 @@ IceRuby_ObjectPrx_ice_getEncodingVersion(VALUE self)
|
|
|
425
423
|
extern "C" VALUE
|
|
426
424
|
IceRuby_ObjectPrx_ice_encodingVersion(VALUE self, VALUE v)
|
|
427
425
|
{
|
|
428
|
-
|
|
429
|
-
if (getEncodingVersion(v, val))
|
|
426
|
+
ICE_RUBY_TRY
|
|
430
427
|
{
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
Ice::ObjectPrx p = getProxy(self);
|
|
434
|
-
return createProxy(p->ice_encodingVersion(val), rb_class_of(self));
|
|
435
|
-
}
|
|
436
|
-
ICE_RUBY_CATCH
|
|
437
|
-
}
|
|
428
|
+
Ice::EncodingVersion val;
|
|
429
|
+
getEncodingVersion(v, val);
|
|
438
430
|
|
|
431
|
+
Ice::ObjectPrx p = getProxy(self);
|
|
432
|
+
return createProxy(p->ice_encodingVersion(val), rb_class_of(self));
|
|
433
|
+
}
|
|
434
|
+
ICE_RUBY_CATCH
|
|
439
435
|
return Qnil;
|
|
440
436
|
}
|
|
441
437
|
|
|
@@ -766,13 +762,9 @@ IceRuby_ObjectPrx_cmp(VALUE self, VALUE other)
|
|
|
766
762
|
{
|
|
767
763
|
ICE_RUBY_TRY
|
|
768
764
|
{
|
|
769
|
-
if (NIL_P(other))
|
|
770
|
-
{
|
|
771
|
-
return INT2NUM(1);
|
|
772
|
-
}
|
|
773
765
|
if (!checkProxy(other))
|
|
774
766
|
{
|
|
775
|
-
|
|
767
|
+
return Qnil;
|
|
776
768
|
}
|
|
777
769
|
Ice::ObjectPrx p1 = getProxy(self);
|
|
778
770
|
Ice::ObjectPrx p2 = getProxy(other);
|
|
@@ -10,7 +10,7 @@ using namespace std;
|
|
|
10
10
|
IceRuby::RubySliceLoader::RubySliceLoader(VALUE sliceLoader) : _sliceLoader{sliceLoader}
|
|
11
11
|
{
|
|
12
12
|
// Mark the object as in use for the lifetime of this wrapper.
|
|
13
|
-
rb_gc_register_address(&
|
|
13
|
+
rb_gc_register_address(&_sliceLoader);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
IceRuby::RubySliceLoader::~RubySliceLoader() { rb_gc_unregister_address(&_sliceLoader); }
|
|
@@ -15,6 +15,12 @@ namespace IceRuby
|
|
|
15
15
|
explicit RubySliceLoader(VALUE sliceLoader);
|
|
16
16
|
~RubySliceLoader() final;
|
|
17
17
|
|
|
18
|
+
// Registers a GC root tied to the address of _sliceLoader, so it's neither copyable nor movable.
|
|
19
|
+
RubySliceLoader(const RubySliceLoader&) = delete;
|
|
20
|
+
RubySliceLoader(RubySliceLoader&&) = delete;
|
|
21
|
+
RubySliceLoader& operator=(const RubySliceLoader&) = delete;
|
|
22
|
+
RubySliceLoader& operator=(RubySliceLoader&&) = delete;
|
|
23
|
+
|
|
18
24
|
[[nodiscard]] Ice::ValuePtr newClassInstance(std::string_view typeId) const final;
|
|
19
25
|
|
|
20
26
|
// TODO: we currently don't support loading of custom Slice exceptions from Ruby.
|