zeroc-ice 3.7.2 → 3.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (283) hide show
  1. checksums.yaml +5 -5
  2. data/ext/Config.h +4 -0
  3. data/ext/Operation.cpp +5 -5
  4. data/ext/Properties.cpp +1 -1
  5. data/ext/Proxy.cpp +16 -2
  6. data/ext/Types.cpp +45 -40
  7. data/ext/Util.cpp +1 -1
  8. data/ext/Util.h +10 -8
  9. data/ext/ice/cpp/include/Ice/Config.h +4 -0
  10. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +1 -1
  11. data/ext/ice/cpp/include/Ice/IconvStringConverter.h +4 -3
  12. data/ext/ice/cpp/include/Ice/InputStream.h +4 -4
  13. data/ext/ice/cpp/include/Ice/Optional.h +11 -0
  14. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +1 -1
  15. data/ext/ice/cpp/include/Ice/OutputStream.h +5 -5
  16. data/ext/ice/cpp/include/Ice/Proxy.h +17 -5
  17. data/ext/ice/cpp/include/Ice/StreamHelpers.h +1 -1
  18. data/ext/ice/cpp/include/Ice/Value.h +1 -1
  19. data/ext/ice/cpp/include/IceUtil/Atomic.h +1 -1
  20. data/ext/ice/cpp/include/IceUtil/Config.h +16 -6
  21. data/ext/ice/cpp/include/IceUtil/ConsoleUtil.h +4 -4
  22. data/ext/ice/cpp/include/IceUtil/Optional.h +8 -0
  23. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +17 -14
  24. data/ext/ice/cpp/include/IceUtil/Random.h +1 -1
  25. data/ext/ice/cpp/include/IceUtil/ResourceConfig.h +2 -2
  26. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +6 -0
  27. data/ext/ice/cpp/include/IceUtil/StringConverter.h +1 -1
  28. data/ext/ice/cpp/include/generated/Ice/BuiltinSequences.h +3 -3
  29. data/ext/ice/cpp/include/generated/Ice/Communicator.h +3 -3
  30. data/ext/ice/cpp/include/generated/Ice/CommunicatorF.h +3 -3
  31. data/ext/ice/cpp/include/generated/Ice/Connection.h +33 -36
  32. data/ext/ice/cpp/include/generated/Ice/ConnectionF.h +3 -3
  33. data/ext/ice/cpp/include/generated/Ice/Current.h +20 -21
  34. data/ext/ice/cpp/include/generated/Ice/Endpoint.h +24 -24
  35. data/ext/ice/cpp/include/generated/Ice/EndpointF.h +3 -3
  36. data/ext/ice/cpp/include/generated/Ice/EndpointTypes.h +3 -3
  37. data/ext/ice/cpp/include/generated/Ice/FacetMap.h +3 -3
  38. data/ext/ice/cpp/include/generated/Ice/Identity.h +4 -5
  39. data/ext/ice/cpp/include/generated/Ice/ImplicitContext.h +3 -3
  40. data/ext/ice/cpp/include/generated/Ice/ImplicitContextF.h +3 -3
  41. data/ext/ice/cpp/include/generated/Ice/Instrumentation.h +15 -15
  42. data/ext/ice/cpp/include/generated/Ice/InstrumentationF.h +3 -3
  43. data/ext/ice/cpp/include/generated/Ice/LocalException.h +27 -93
  44. data/ext/ice/cpp/include/generated/Ice/Locator.h +27 -32
  45. data/ext/ice/cpp/include/generated/Ice/LocatorF.h +3 -3
  46. data/ext/ice/cpp/include/generated/Ice/Logger.h +3 -3
  47. data/ext/ice/cpp/include/generated/Ice/LoggerF.h +3 -3
  48. data/ext/ice/cpp/include/generated/Ice/Metrics.h +75 -79
  49. data/ext/ice/cpp/include/generated/Ice/ObjectAdapter.h +3 -3
  50. data/ext/ice/cpp/include/generated/Ice/ObjectAdapterF.h +3 -3
  51. data/ext/ice/cpp/include/generated/Ice/ObjectFactory.h +3 -3
  52. data/ext/ice/cpp/include/generated/Ice/Plugin.h +3 -3
  53. data/ext/ice/cpp/include/generated/Ice/PluginF.h +3 -3
  54. data/ext/ice/cpp/include/generated/Ice/Process.h +3 -3
  55. data/ext/ice/cpp/include/generated/Ice/ProcessF.h +3 -3
  56. data/ext/ice/cpp/include/generated/Ice/Properties.h +3 -3
  57. data/ext/ice/cpp/include/generated/Ice/PropertiesAdmin.h +9 -9
  58. data/ext/ice/cpp/include/generated/Ice/PropertiesF.h +3 -3
  59. data/ext/ice/cpp/include/generated/Ice/RemoteLogger.h +9 -11
  60. data/ext/ice/cpp/include/generated/Ice/Router.h +22 -22
  61. data/ext/ice/cpp/include/generated/Ice/RouterF.h +3 -3
  62. data/ext/ice/cpp/include/generated/Ice/ServantLocator.h +3 -3
  63. data/ext/ice/cpp/include/generated/Ice/ServantLocatorF.h +3 -3
  64. data/ext/ice/cpp/include/generated/Ice/SliceChecksumDict.h +3 -3
  65. data/ext/ice/cpp/include/generated/Ice/ValueFactory.h +3 -3
  66. data/ext/ice/cpp/include/generated/Ice/Version.h +15 -17
  67. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +3 -3
  68. data/ext/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +3 -3
  69. data/ext/ice/cpp/include/generated/IceSSL/EndpointInfo.h +3 -3
  70. data/ext/ice/cpp/src/Ice/ArgVector.cpp +3 -3
  71. data/ext/ice/cpp/src/Ice/Base64.cpp +11 -12
  72. data/ext/ice/cpp/src/Ice/BatchRequestQueue.cpp +1 -1
  73. data/ext/ice/cpp/src/Ice/Buffer.cpp +2 -2
  74. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +3 -3
  75. data/ext/ice/cpp/src/Ice/Communicator.cpp +3 -3
  76. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +3 -3
  77. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +19 -0
  78. data/ext/ice/cpp/src/Ice/CommunicatorI.h +5 -0
  79. data/ext/ice/cpp/src/Ice/Connection.cpp +3 -3
  80. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +3 -3
  81. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +31 -16
  82. data/ext/ice/cpp/src/Ice/Current.cpp +3 -3
  83. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +13 -0
  84. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +6 -5
  85. data/ext/ice/cpp/src/Ice/Endpoint.cpp +3 -3
  86. data/ext/ice/cpp/src/Ice/EndpointF.cpp +3 -3
  87. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +3 -3
  88. data/ext/ice/cpp/src/Ice/Exception.cpp +5 -5
  89. data/ext/ice/cpp/src/Ice/FacetMap.cpp +3 -3
  90. data/ext/ice/cpp/src/Ice/HashUtil.h +1 -1
  91. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +12 -1
  92. data/ext/ice/cpp/src/Ice/Identity.cpp +3 -3
  93. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +3 -3
  94. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +3 -3
  95. data/ext/ice/cpp/src/Ice/Incoming.cpp +2 -0
  96. data/ext/ice/cpp/src/Ice/Initialize.cpp +4 -3
  97. data/ext/ice/cpp/src/Ice/InputStream.cpp +19 -19
  98. data/ext/ice/cpp/src/Ice/Instance.cpp +28 -8
  99. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +3 -3
  100. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +3 -3
  101. data/ext/ice/cpp/src/Ice/LocalException.cpp +3 -3
  102. data/ext/ice/cpp/src/Ice/Locator.cpp +7 -7
  103. data/ext/ice/cpp/src/Ice/LocatorF.cpp +3 -3
  104. data/ext/ice/cpp/src/Ice/Logger.cpp +3 -3
  105. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +1 -7
  106. data/ext/ice/cpp/src/Ice/LoggerF.cpp +3 -3
  107. data/ext/ice/cpp/src/Ice/LoggerI.cpp +6 -0
  108. data/ext/ice/cpp/src/Ice/Metrics.cpp +5 -5
  109. data/ext/ice/cpp/src/Ice/Network.cpp +23 -22
  110. data/ext/ice/cpp/src/Ice/Network.h +1 -1
  111. data/ext/ice/cpp/src/Ice/OSLogLoggerI.cpp +57 -0
  112. data/ext/ice/cpp/src/Ice/OSLogLoggerI.h +40 -0
  113. data/ext/ice/cpp/src/Ice/Object.cpp +9 -7
  114. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +3 -3
  115. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +3 -3
  116. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +13 -1
  117. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +4 -0
  118. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +3 -3
  119. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +1 -1
  120. data/ext/ice/cpp/src/Ice/OutputStream.cpp +24 -24
  121. data/ext/ice/cpp/src/Ice/Plugin.cpp +3 -3
  122. data/ext/ice/cpp/src/Ice/PluginF.cpp +3 -3
  123. data/ext/ice/cpp/src/Ice/Process.cpp +3 -3
  124. data/ext/ice/cpp/src/Ice/ProcessF.cpp +3 -3
  125. data/ext/ice/cpp/src/Ice/Properties.cpp +3 -3
  126. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +4 -4
  127. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +3 -3
  128. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +2 -1
  129. data/ext/ice/cpp/src/Ice/PropertyNames.h +1 -1
  130. data/ext/ice/cpp/src/Ice/Proxy.cpp +6 -0
  131. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +1 -1
  132. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +1 -1
  133. data/ext/ice/cpp/src/Ice/RegisterPluginsInit.cpp +3 -2
  134. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +3 -3
  135. data/ext/ice/cpp/src/Ice/Router.cpp +6 -6
  136. data/ext/ice/cpp/src/Ice/RouterF.cpp +3 -3
  137. data/ext/ice/cpp/src/Ice/SHA1.cpp +2 -2
  138. data/ext/ice/cpp/src/Ice/Selector.cpp +18 -13
  139. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +3 -3
  140. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +3 -3
  141. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +3 -3
  142. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +6 -6
  143. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +6 -0
  144. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +5 -0
  145. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +5 -0
  146. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +5 -0
  147. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +63 -0
  148. data/ext/ice/cpp/src/Ice/ThreadPool.h +10 -2
  149. data/ext/ice/cpp/src/Ice/Timer.cpp +10 -0
  150. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +11 -1
  151. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +10 -2
  152. data/ext/ice/cpp/src/Ice/ValueFactory.cpp +3 -3
  153. data/ext/ice/cpp/src/Ice/Version.cpp +3 -3
  154. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +16 -15
  155. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +3 -3
  156. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +3 -3
  157. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.cpp +3 -3
  158. data/ext/ice/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.h +3 -3
  159. data/ext/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +37 -8
  160. data/ext/ice/cpp/src/IceSSL/CertificateI.cpp +3 -3
  161. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +3 -3
  162. data/ext/ice/cpp/src/IceSSL/ConnectionInfoF.cpp +3 -3
  163. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +3 -3
  164. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +4 -16
  165. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -1
  166. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +40 -3
  167. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -7
  168. data/ext/ice/cpp/src/IceSSL/SChannelEngine.h +0 -2
  169. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +18 -6
  170. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +19 -7
  171. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +2 -0
  172. data/ext/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +32 -21
  173. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +21 -6
  174. data/ext/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +19 -16
  175. data/ext/ice/cpp/src/IceSSL/Util.cpp +11 -5
  176. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +1 -1
  177. data/ext/ice/cpp/src/IceUtil/Options.cpp +3 -3
  178. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +40 -10
  179. data/ext/ice/cpp/src/IceUtil/Random.cpp +2 -2
  180. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +5 -5
  181. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +3 -3
  182. data/ext/ice/cpp/src/IceUtil/Time.cpp +3 -3
  183. data/ext/ice/cpp/src/IceUtil/UUID.cpp +5 -5
  184. data/ext/ice/cpp/src/IceUtil/UtilException.cpp +4 -4
  185. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +13 -9
  186. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.h +1 -1
  187. data/ext/ice/cpp/src/Slice/Grammar.cpp +8 -0
  188. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +1 -2
  189. data/ext/ice/cpp/src/Slice/MD5I.cpp +8 -0
  190. data/ext/ice/cpp/src/Slice/Parser.cpp +60 -112
  191. data/ext/ice/cpp/src/Slice/Parser.h +27 -1
  192. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +2 -1
  193. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +10 -10
  194. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +1 -1
  195. data/ext/ice/cpp/src/Slice/Scanner.cpp +8 -0
  196. data/ext/ice/cpp/src/Slice/StringLiteralUtil.cpp +11 -6
  197. data/ext/ice/mcpp/Makefile +2 -5
  198. data/ice.gemspec +1 -1
  199. data/lib/Glacier2/Metrics.rb +1 -1
  200. data/lib/Glacier2/PermissionsVerifier.rb +1 -1
  201. data/lib/Glacier2/PermissionsVerifierF.rb +1 -1
  202. data/lib/Glacier2/Router.rb +1 -1
  203. data/lib/Glacier2/RouterF.rb +1 -1
  204. data/lib/Glacier2/SSLInfo.rb +1 -1
  205. data/lib/Glacier2/Session.rb +1 -1
  206. data/lib/Ice/BuiltinSequences.rb +1 -1
  207. data/lib/Ice/Communicator.rb +1 -1
  208. data/lib/Ice/CommunicatorF.rb +1 -1
  209. data/lib/Ice/Connection.rb +1 -1
  210. data/lib/Ice/ConnectionF.rb +1 -1
  211. data/lib/Ice/Current.rb +1 -1
  212. data/lib/Ice/Endpoint.rb +1 -1
  213. data/lib/Ice/EndpointF.rb +1 -1
  214. data/lib/Ice/EndpointTypes.rb +1 -1
  215. data/lib/Ice/FacetMap.rb +1 -1
  216. data/lib/Ice/Identity.rb +1 -1
  217. data/lib/Ice/ImplicitContext.rb +1 -1
  218. data/lib/Ice/ImplicitContextF.rb +1 -1
  219. data/lib/Ice/Instrumentation.rb +1 -1
  220. data/lib/Ice/InstrumentationF.rb +1 -1
  221. data/lib/Ice/LocalException.rb +1 -1
  222. data/lib/Ice/Locator.rb +1 -1
  223. data/lib/Ice/LocatorF.rb +1 -1
  224. data/lib/Ice/Logger.rb +1 -1
  225. data/lib/Ice/LoggerF.rb +1 -1
  226. data/lib/Ice/Metrics.rb +1 -1
  227. data/lib/Ice/ObjectAdapter.rb +1 -1
  228. data/lib/Ice/ObjectAdapterF.rb +1 -1
  229. data/lib/Ice/ObjectFactory.rb +1 -1
  230. data/lib/Ice/Plugin.rb +1 -1
  231. data/lib/Ice/PluginF.rb +1 -1
  232. data/lib/Ice/Process.rb +1 -1
  233. data/lib/Ice/ProcessF.rb +1 -1
  234. data/lib/Ice/Properties.rb +1 -1
  235. data/lib/Ice/PropertiesAdmin.rb +1 -1
  236. data/lib/Ice/PropertiesF.rb +1 -1
  237. data/lib/Ice/RemoteLogger.rb +1 -1
  238. data/lib/Ice/Router.rb +1 -1
  239. data/lib/Ice/RouterF.rb +1 -1
  240. data/lib/Ice/ServantLocator.rb +1 -1
  241. data/lib/Ice/ServantLocatorF.rb +1 -1
  242. data/lib/Ice/SliceChecksumDict.rb +1 -1
  243. data/lib/Ice/ValueFactory.rb +1 -1
  244. data/lib/Ice/Version.rb +1 -1
  245. data/lib/IceBox/IceBox.rb +1 -1
  246. data/lib/IceGrid/Admin.rb +1 -1
  247. data/lib/IceGrid/Descriptor.rb +1 -1
  248. data/lib/IceGrid/Exception.rb +1 -1
  249. data/lib/IceGrid/FileParser.rb +1 -1
  250. data/lib/IceGrid/PluginFacade.rb +1 -1
  251. data/lib/IceGrid/Registry.rb +1 -1
  252. data/lib/IceGrid/Session.rb +1 -1
  253. data/lib/IceGrid/UserAccountMapper.rb +1 -1
  254. data/lib/IcePatch2/FileInfo.rb +1 -1
  255. data/lib/IcePatch2/FileServer.rb +1 -1
  256. data/lib/IceStorm/IceStorm.rb +1 -1
  257. data/lib/IceStorm/Metrics.rb +1 -1
  258. data/slice/Glacier2/Metrics.ice +1 -1
  259. data/slice/Ice/Communicator.ice +57 -25
  260. data/slice/Ice/Connection.ice +14 -14
  261. data/slice/Ice/Current.ice +1 -1
  262. data/slice/Ice/Endpoint.ice +6 -6
  263. data/slice/Ice/EndpointF.ice +1 -1
  264. data/slice/Ice/FacetMap.ice +1 -1
  265. data/slice/Ice/ImplicitContext.ice +6 -6
  266. data/slice/Ice/Instrumentation.ice +6 -6
  267. data/slice/Ice/Logger.ice +6 -6
  268. data/slice/Ice/Metrics.ice +12 -9
  269. data/slice/Ice/ObjectAdapter.ice +43 -31
  270. data/slice/Ice/ObjectFactory.ice +1 -1
  271. data/slice/Ice/Plugin.ice +2 -2
  272. data/slice/Ice/Properties.ice +10 -10
  273. data/slice/Ice/ServantLocator.ice +4 -2
  274. data/slice/Ice/ValueFactory.ice +3 -3
  275. data/slice/IceBT/EndpointInfo.ice +1 -1
  276. data/slice/IceGrid/PluginFacade.ice +4 -4
  277. data/slice/IceIAP/ConnectionInfo.ice +1 -1
  278. data/slice/IceIAP/EndpointInfo.ice +1 -1
  279. data/slice/IceSSL/ConnectionInfo.ice +3 -2
  280. data/slice/IceSSL/ConnectionInfoF.ice +1 -1
  281. data/slice/IceSSL/EndpointInfo.ice +1 -1
  282. data/slice/IceStorm/Metrics.ice +1 -1
  283. metadata +5 -3
@@ -144,7 +144,7 @@ IceUtil::Time::now(Clock clock)
144
144
  }
145
145
  return Time(tv.tv_sec * ICE_INT64(1000000) + tv.tv_usec);
146
146
  #elif defined(__APPLE__)
147
- return Time(mach_absolute_time() * machMultiplier);
147
+ return Time(static_cast<IceUtil::Int64>(mach_absolute_time() * machMultiplier));
148
148
  #else
149
149
  struct timespec ts;
150
150
  if(clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
@@ -197,8 +197,8 @@ IceUtil::Time::microSecondsDouble(double t)
197
197
  IceUtil::Time::operator timeval() const
198
198
  {
199
199
  timeval tv;
200
- tv.tv_sec = static_cast<long>(_usec / 1000000);
201
- tv.tv_usec = static_cast<long>(_usec % 1000000);
200
+ tv.tv_sec = static_cast<time_t>(_usec / 1000000);
201
+ tv.tv_usec = static_cast<suseconds_t>(_usec % 1000000);
202
202
  return tv;
203
203
  }
204
204
  #endif
@@ -47,7 +47,7 @@ public:
47
47
  int p = GetCurrentProcessId();
48
48
  #endif
49
49
  myPid[0] = (p >> 8) & 0x7F;
50
- myPid[1] = p & 0xFF;
50
+ myPid[1] = static_cast<char>(p & 0xFF);
51
51
  }
52
52
  };
53
53
 
@@ -65,11 +65,11 @@ inline void halfByteToHex(unsigned char hb, char*& hexBuffer)
65
65
  {
66
66
  if(hb < 10)
67
67
  {
68
- *hexBuffer++ = '0' + hb;
68
+ *hexBuffer++ = '0' + static_cast<char>(hb);
69
69
  }
70
70
  else
71
71
  {
72
- *hexBuffer++ = 'A' + (hb - 10);
72
+ *hexBuffer++ = 'A' + static_cast<char>(hb - 10);
73
73
  }
74
74
  }
75
75
 
@@ -143,8 +143,8 @@ IceUtil::generateUUID()
143
143
  //
144
144
  // Replace the end of the node by myPid (15 bits)
145
145
  //
146
- uuid.node[4] = (uuid.node[4] & 0x80) | myPid[0];
147
- uuid.node[5] = myPid[1];
146
+ uuid.node[4] = (uuid.node[4] & 0x80) | static_cast<unsigned char>(myPid[0]);
147
+ uuid.node[5] = static_cast<unsigned char>(myPid[1]);
148
148
 
149
149
  //
150
150
  // Convert to a UUID string
@@ -43,7 +43,7 @@
43
43
  # endif
44
44
  # endif
45
45
 
46
- # if !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && !defined(ICE_STATIC_LIBS)
46
+ # if !defined(_AIX) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && !defined(ICE_STATIC_LIBS)
47
47
  # include <execinfo.h>
48
48
  # include <cxxabi.h>
49
49
  # include <stdint.h>
@@ -350,8 +350,8 @@ getStackFrames()
350
350
  #elif defined(ICE_BACKTRACE)
351
351
 
352
352
  stackFrames.resize(100);
353
- size_t stackDepth = backtrace(&stackFrames.front(), stackFrames.size());
354
- stackFrames.resize(stackDepth);
353
+ int stackDepth = backtrace(&stackFrames.front(), static_cast<int>(stackFrames.size()));
354
+ stackFrames.resize(static_cast<size_t>(stackDepth));
355
355
  if(!stackFrames.empty())
356
356
  {
357
357
  stackFrames.erase(stackFrames.begin()); // drop the first frame
@@ -468,7 +468,7 @@ getStackTrace(const vector<void*>& stackFrames)
468
468
  // Initialize backtraceStrings immediately
469
469
  if(p != stackFrames.end())
470
470
  {
471
- backtraceStrings = backtrace_symbols(&*p, stackFrames.size());
471
+ backtraceStrings = backtrace_symbols(&*p, static_cast<int>(stackFrames.size()));
472
472
  }
473
473
  # endif
474
474
 
@@ -527,7 +527,7 @@ Slice::printVersionCheck(Output& out)
527
527
  out << "\n";
528
528
  out << "\n#ifndef ICE_IGNORE_VERSION";
529
529
  int iceVersion = ICE_INT_VERSION; // Use this to prevent warning with C++Builder
530
- if(iceVersion % 100 > 50)
530
+ if(iceVersion % 100 >= 50)
531
531
  {
532
532
  //
533
533
  // Beta version: exact match required
@@ -545,7 +545,7 @@ Slice::printVersionCheck(Output& out)
545
545
  //
546
546
  // Generated code is release; reject beta header
547
547
  //
548
- out << "\n# if ICE_INT_VERSION % 100 > 50";
548
+ out << "\n# if ICE_INT_VERSION % 100 >= 50";
549
549
  out << "\n# error Beta header file detected";
550
550
  out << "\n# endif";
551
551
 
@@ -752,13 +752,13 @@ Slice::typeToString(const TypePtr& type, const string& scope, const StringList&
752
752
  // Non local classes without operations map to the base
753
753
  // proxy class shared_ptr<Ice::ObjectPrx>
754
754
  //
755
- if(def && !def->isInterface() && def->allOperations().empty())
755
+ if(!def || def->isAbstract())
756
756
  {
757
- return getUnqualified(cpp11BuiltinTable[Builtin::KindObjectProxy], scope);
757
+ return "::std::shared_ptr<" + getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">";
758
758
  }
759
759
  else
760
760
  {
761
- return "::std::shared_ptr<" + getUnqualified(fixKwd(proxy->_class()->scoped() + "Prx"), scope) + ">";
761
+ return getUnqualified(cpp11BuiltinTable[Builtin::KindObjectProxy], scope);
762
762
  }
763
763
  }
764
764
  else
@@ -1496,7 +1496,7 @@ Slice::writeStreamHelpers(Output& out,
1496
1496
  bool cpp11)
1497
1497
  {
1498
1498
  // If c is a C++11 class/exception whose base class contains data members (recursively), then we need to generate
1499
- // an StreamWriter even if its implementation is empty. This is becuase our default marsaling uses ice_tuple() which
1499
+ // a StreamWriter even if its implementation is empty. This is because our default marshaling uses ice_tuple() which
1500
1500
  // contains all of our class/exception's data members as well the base data members, which breaks marshaling. This
1501
1501
  // is not an issue for structs.
1502
1502
  if(dataMembers.empty() && !(cpp11 && hasBaseDataMembers))
@@ -1580,7 +1580,7 @@ Slice::writeStreamHelpers(Output& out,
1580
1580
  }
1581
1581
 
1582
1582
  //
1583
- // Generate StreamWriter
1583
+ // Generate StreamReader
1584
1584
  //
1585
1585
  out << nl << "template<typename S>";
1586
1586
  out << nl << "struct StreamReader" << (cpp11 ? "<" : "< ") << fullName << ", S>";
@@ -1619,9 +1619,13 @@ Slice::writeStreamHelpers(Output& out,
1619
1619
  }
1620
1620
 
1621
1621
  void
1622
- Slice::writeIceTuple(::IceUtilInternal::Output& out, const string& scope, DataMemberList dataMembers, int typeCtx)
1622
+ Slice::writeIceTuple(::IceUtilInternal::Output& out, DataMemberList dataMembers, int typeCtx)
1623
1623
  {
1624
- out << sp << nl << "std::tuple<";
1624
+ //
1625
+ // Use an empty scope to get full qualified names from calls to typeToString.
1626
+ //
1627
+ const string scope = "";
1628
+ out << nl << "std::tuple<";
1625
1629
  for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
1626
1630
  {
1627
1631
  if(q != dataMembers.begin())
@@ -59,7 +59,7 @@ void writeEndCode(::IceUtilInternal::Output&, const ParamDeclList&, const Operat
59
59
  void writeMarshalUnmarshalDataMemberInHolder(IceUtilInternal::Output&, const std::string&, const DataMemberPtr&, bool);
60
60
  void writeMarshalUnmarshalAllInHolder(IceUtilInternal::Output&, const std::string&, const DataMemberList&, bool, bool);
61
61
  void writeStreamHelpers(::IceUtilInternal::Output&, const ContainedPtr&, DataMemberList, bool, bool, bool);
62
- void writeIceTuple(::IceUtilInternal::Output&, const std::string&, DataMemberList, int);
62
+ void writeIceTuple(::IceUtilInternal::Output&, DataMemberList, int);
63
63
 
64
64
  bool findMetaData(const std::string&, const ClassDeclPtr&, std::string&);
65
65
  bool findMetaData(const std::string&, const StringList&, std::string&);
@@ -98,6 +98,14 @@
98
98
  # pragma GCC diagnostic ignored "-Wold-style-cast"
99
99
  #endif
100
100
 
101
+ //
102
+ // Avoid clang conversion warnings
103
+ //
104
+ #if defined(__clang__)
105
+ # pragma clang diagnostic ignored "-Wconversion"
106
+ # pragma clang diagnostic ignored "-Wsign-conversion"
107
+ #endif
108
+
101
109
  using namespace std;
102
110
  using namespace Slice;
103
111
 
@@ -3764,8 +3764,7 @@ Slice::JavaGenerator::typeToString(const TypePtr& type,
3764
3764
  if(proxy)
3765
3765
  {
3766
3766
  ClassDefPtr def = proxy->_class()->definition();
3767
- assert(def);
3768
- if(def->isAbstract())
3767
+ if(!def || def->isAbstract())
3769
3768
  {
3770
3769
  return getUnqualified(proxy->_class(), package, "", "Prx");
3771
3770
  }
@@ -58,6 +58,14 @@
58
58
  # pragma GCC diagnostic ignored "-Wold-style-cast"
59
59
  #endif
60
60
 
61
+ //
62
+ // Avoid clang conversion warnings
63
+ //
64
+ #if defined(__clang__)
65
+ # pragma clang diagnostic ignored "-Wconversion"
66
+ # pragma clang diagnostic ignored "-Wsign-conversion"
67
+ #endif
68
+
61
69
  #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
62
70
  #ifdef ARCH_IS_BIG_ENDIAN
63
71
  # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
@@ -19,6 +19,51 @@
19
19
  using namespace std;
20
20
  using namespace Slice;
21
21
 
22
+ Slice::CompilerException::CompilerException(const char* file, int line, const string& r) :
23
+ IceUtil::Exception(file, line),
24
+ _reason(r)
25
+ {
26
+ }
27
+
28
+ #ifndef ICE_CPP11_COMPILER
29
+ Slice::CompilerException::~CompilerException() throw()
30
+ {
31
+ }
32
+ #endif
33
+
34
+ string
35
+ Slice::CompilerException::ice_id() const
36
+ {
37
+ return "::Slice::CompilerException";
38
+ }
39
+
40
+ void
41
+ Slice::CompilerException::ice_print(ostream& out) const
42
+ {
43
+ IceUtil::Exception::ice_print(out);
44
+ out << ": " << _reason;
45
+ }
46
+
47
+ #ifndef ICE_CPP11_MAPPING
48
+ Slice::CompilerException*
49
+ Slice::CompilerException::ice_clone() const
50
+ {
51
+ return new CompilerException(*this);
52
+ }
53
+ #endif
54
+
55
+ void
56
+ Slice::CompilerException::ice_throw() const
57
+ {
58
+ throw *this;
59
+ }
60
+
61
+ string
62
+ Slice::CompilerException::reason() const
63
+ {
64
+ return _reason;
65
+ }
66
+
22
67
  extern FILE* slice_in;
23
68
  extern int slice_debug;
24
69
 
@@ -227,6 +272,20 @@ Slice::DefinitionContext::warning(WarningCategory category, const string& file,
227
272
  }
228
273
  }
229
274
 
275
+ void
276
+ Slice::DefinitionContext::error(const string& file, int line, const string& msg) const
277
+ {
278
+ emitError(file, line, msg);
279
+ throw CompilerException(__FILE__, __LINE__, msg);
280
+ }
281
+
282
+ void
283
+ Slice::DefinitionContext::error(const string& file, const string& line, const string& msg) const
284
+ {
285
+ emitError(file, line, msg);
286
+ throw CompilerException(__FILE__, __LINE__, msg);
287
+ }
288
+
230
289
  bool
231
290
  Slice::DefinitionContext::suppressWarning(WarningCategory category) const
232
291
  {
@@ -4298,6 +4357,7 @@ Slice::ClassDef::isDelegate() const
4298
4357
  {
4299
4358
  return isLocal() && isInterface() && hasMetaData("delegate") && allOperations().size() == 1;
4300
4359
  }
4360
+
4301
4361
  Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int id, bool intf, const ClassList& bases,
4302
4362
  bool local) :
4303
4363
  SyntaxTreeBase(container->unit()),
@@ -6835,11 +6895,6 @@ Slice::Unit::parse(const string& filename, FILE* file, bool debug)
6835
6895
  popContainer();
6836
6896
  assert(_definitionContextStack.size() == 1);
6837
6897
  popDefinitionContext();
6838
-
6839
- if(!checkUndefinedTypes())
6840
- {
6841
- status = EXIT_FAILURE;
6842
- }
6843
6898
  }
6844
6899
 
6845
6900
  Slice::unit = 0;
@@ -6938,113 +6993,6 @@ Slice::Unit::eraseWhiteSpace(string& s)
6938
6993
  }
6939
6994
  }
6940
6995
 
6941
- bool
6942
- Slice::Unit::checkUndefinedTypes()
6943
- {
6944
- class Visitor : public ParserVisitor
6945
- {
6946
- public:
6947
-
6948
- Visitor(int& errors) :
6949
- _errors(errors),
6950
- _local(false)
6951
- {
6952
- }
6953
-
6954
- virtual bool visitClassDefStart(const ClassDefPtr& p)
6955
- {
6956
- _local = p->isLocal();
6957
- return true;
6958
- }
6959
-
6960
- virtual bool visitExceptionStart(const ExceptionPtr& p)
6961
- {
6962
- _local = p->isLocal();
6963
- return true;
6964
- }
6965
-
6966
- virtual bool visitStructStart(const StructPtr& p)
6967
- {
6968
- _local = p->isLocal();
6969
- return true;
6970
- }
6971
-
6972
- virtual void visitOperation(const OperationPtr& p)
6973
- {
6974
- if(p->returnType())
6975
- {
6976
- checkUndefined(p->returnType(), "return type", p->file(), p->line());
6977
- }
6978
- ParamDeclList params = p->parameters();
6979
- for(ParamDeclList::const_iterator q = params.begin(); q != params.end(); ++q)
6980
- {
6981
- checkUndefined((*q)->type(), "parameter " + (*q)->name(), (*q)->file(), (*q)->line());
6982
- }
6983
- }
6984
-
6985
- virtual void visitParamDecl(const ParamDeclPtr& p)
6986
- {
6987
- checkUndefined(p->type(), "parameter " + p->name(), p->file(), p->line());
6988
- }
6989
-
6990
- virtual void visitDataMember(const DataMemberPtr& p)
6991
- {
6992
- checkUndefined(p->type(), "member " + p->name(), p->file(), p->line());
6993
- }
6994
-
6995
- virtual void visitSequence(const SequencePtr& p)
6996
- {
6997
- _local = p->isLocal();
6998
- checkUndefined(p->type(), "element type", p->file(), p->line());
6999
- }
7000
-
7001
- virtual void visitDictionary(const DictionaryPtr& p)
7002
- {
7003
- _local = p->isLocal();
7004
- checkUndefined(p->keyType(), "key type", p->file(), p->line());
7005
- checkUndefined(p->valueType(), "value type", p->file(), p->line());
7006
- }
7007
-
7008
- private:
7009
-
7010
- void checkUndefined(const TypePtr& type, const string& desc, const string& file, const string& line)
7011
- {
7012
- //
7013
- // See ICE-6867. Any use of a proxy requires the full type definition, as does any
7014
- // use of a class in a non-local context.
7015
- //
7016
- ProxyPtr p = ProxyPtr::dynamicCast(type);
7017
- if(p)
7018
- {
7019
- const ClassDeclPtr cl = p->_class();
7020
- if(!cl->definition())
7021
- {
7022
- ostringstream ostr;
7023
- ostr << desc << " uses a proxy for undefined type `" << cl->scoped() << "'";
7024
- emitError(file, line, ostr.str());
7025
- _errors++;
7026
- }
7027
- }
7028
-
7029
- ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type);
7030
- if(cl && !cl->definition() && !_local)
7031
- {
7032
- ostringstream ostr;
7033
- ostr << desc << " refers to undefined type `" << cl->scoped() << "'";
7034
- emitError(file, line, ostr.str());
7035
- _errors++;
7036
- }
7037
- }
7038
-
7039
- int& _errors;
7040
- bool _local;
7041
- };
7042
-
7043
- Visitor v(_errors);
7044
- visit(&v, true);
7045
- return _errors == 0;
7046
- }
7047
-
7048
6996
  // ----------------------------------------------------------------------
7049
6997
  // CICompare
7050
6998
  // ----------------------------------------------------------------------
@@ -7,6 +7,7 @@
7
7
 
8
8
  #include <IceUtil/Shared.h>
9
9
  #include <IceUtil/Handle.h>
10
+ #include <IceUtil/Exception.h>
10
11
  #include <string>
11
12
  #include <vector>
12
13
  #include <list>
@@ -18,6 +19,29 @@
18
19
  namespace Slice
19
20
  {
20
21
 
22
+ class CompilerException : public ::IceUtil::Exception
23
+ {
24
+ public:
25
+
26
+ CompilerException(const char*, int, const std::string&);
27
+ #ifndef ICE_CPP11_COMPILER
28
+ ~CompilerException() throw();
29
+ #endif
30
+ virtual std::string ice_id() const;
31
+ virtual void ice_print(std::ostream&) const;
32
+ #ifndef ICE_CPP11_MAPPING
33
+ virtual CompilerException* ice_clone() const;
34
+ #endif
35
+ virtual void ice_throw() const;
36
+
37
+ std::string reason() const;
38
+
39
+ private:
40
+
41
+ static const char* _name;
42
+ const std::string _reason;
43
+ };
44
+
21
45
  #if defined(_WIN32) && !defined(__MINGW32__)
22
46
 
23
47
  const IceUtil::Int64 Int32Max = 0x7fffffffi64;
@@ -241,6 +265,9 @@ public:
241
265
  void warning(WarningCategory, const std::string&, int, const std::string&) const;
242
266
  void warning(WarningCategory, const std::string&, const std::string&, const std::string&) const;
243
267
 
268
+ void error(const std::string&, int, const std::string&) const;
269
+ void error(const std::string&, const std::string&, const std::string&) const;
270
+
244
271
  private:
245
272
 
246
273
  bool suppressWarning(WarningCategory) const;
@@ -1118,7 +1145,6 @@ private:
1118
1145
 
1119
1146
  Unit(bool, bool, bool, bool, const StringList&);
1120
1147
  static void eraseWhiteSpace(::std::string&);
1121
- bool checkUndefinedTypes();
1122
1148
 
1123
1149
  bool _ignRedefs;
1124
1150
  bool _all;