diff options
-rw-r--r-- | php/src/php7/Config.h | 4 | ||||
-rw-r--r-- | python/modules/IcePy/BatchRequestInterceptor.cpp | 8 | ||||
-rw-r--r-- | python/modules/IcePy/Communicator.cpp | 28 | ||||
-rw-r--r-- | python/modules/IcePy/Connection.cpp | 24 | ||||
-rw-r--r-- | python/modules/IcePy/ConnectionInfo.cpp | 34 | ||||
-rw-r--r-- | python/modules/IcePy/Endpoint.cpp | 6 | ||||
-rw-r--r-- | python/modules/IcePy/EndpointInfo.cpp | 28 | ||||
-rw-r--r-- | python/modules/IcePy/ImplicitContext.cpp | 4 | ||||
-rw-r--r-- | python/modules/IcePy/Init.cpp | 4 | ||||
-rw-r--r-- | python/modules/IcePy/Logger.cpp | 4 | ||||
-rw-r--r-- | python/modules/IcePy/Logger.h | 2 | ||||
-rw-r--r-- | python/modules/IcePy/ObjectAdapter.cpp | 22 | ||||
-rw-r--r-- | python/modules/IcePy/Operation.cpp | 22 | ||||
-rw-r--r-- | python/modules/IcePy/Properties.cpp | 4 | ||||
-rw-r--r-- | python/modules/IcePy/Proxy.cpp | 72 | ||||
-rw-r--r-- | python/modules/IcePy/Util.cpp | 12 | ||||
-rw-r--r-- | python/modules/IcePy/Util.h | 12 | ||||
-rw-r--r-- | ruby/src/IceRuby/Util.h | 74 |
18 files changed, 208 insertions, 156 deletions
diff --git a/php/src/php7/Config.h b/php/src/php7/Config.h index f4d49ccd5c4..d03e2f5cd6f 100644 --- a/php/src/php7/Config.h +++ b/php/src/php7/Config.h @@ -47,6 +47,10 @@ extern "C" # pragma GCC diagnostic warning "-Wnarrowing" #endif +#if defined(__GNUC__) && ((__GNUC__ >= 8)) +# pragma GCC diagnostic ignored "-Wignored-qualifiers" +#endif + // // The php.h header defines/undefines NDEBUG based on how the PHP binary was built. // As a result, asserts are always disabled unless building against a php binary diff --git a/python/modules/IcePy/BatchRequestInterceptor.cpp b/python/modules/IcePy/BatchRequestInterceptor.cpp index 81e24d067d4..fab43435a7b 100644 --- a/python/modules/IcePy/BatchRequestInterceptor.cpp +++ b/python/modules/IcePy/BatchRequestInterceptor.cpp @@ -52,7 +52,7 @@ batchRequestDealloc(BatchRequestObject* self) extern "C" #endif static PyObject* -batchRequestGetSize(BatchRequestObject* self) +batchRequestGetSize(BatchRequestObject* self, PyObject* /*args*/) { assert(self->request); if(!self->size) @@ -78,7 +78,7 @@ batchRequestGetSize(BatchRequestObject* self) extern "C" #endif static PyObject* -batchRequestGetOperation(BatchRequestObject* self) +batchRequestGetOperation(BatchRequestObject* self, PyObject* /*args*/) { assert(self->request); if(!self->operation) @@ -104,7 +104,7 @@ batchRequestGetOperation(BatchRequestObject* self) extern "C" #endif static PyObject* -batchRequestGetProxy(BatchRequestObject* self) +batchRequestGetProxy(BatchRequestObject* self, PyObject* /*args*/) { assert(self->request); if(!self->proxy) @@ -130,7 +130,7 @@ batchRequestGetProxy(BatchRequestObject* self) extern "C" #endif static PyObject* -batchRequestEnqueue(BatchRequestObject* self) +batchRequestEnqueue(BatchRequestObject* self, PyObject* /*args*/) { assert(self->request); diff --git a/python/modules/IcePy/Communicator.cpp b/python/modules/IcePy/Communicator.cpp index ab3cbbff154..d2e748388cc 100644 --- a/python/modules/IcePy/Communicator.cpp +++ b/python/modules/IcePy/Communicator.cpp @@ -33,6 +33,10 @@ using namespace std; using namespace IcePy; +#if defined(__GNUC__) && ((__GNUC__ >= 8)) +# pragma GCC diagnostic ignored "-Wcast-function-type" +#endif + #if PY_VERSION_HEX < 0x03070000 static long _mainThreadId; #else @@ -379,7 +383,7 @@ communicatorDealloc(CommunicatorObject* self) extern "C" #endif static PyObject* -communicatorDestroy(CommunicatorObject* self) +communicatorDestroy(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); @@ -424,7 +428,7 @@ communicatorDestroy(CommunicatorObject* self) extern "C" #endif static PyObject* -communicatorShutdown(CommunicatorObject* self) +communicatorShutdown(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); try @@ -530,7 +534,7 @@ communicatorWaitForShutdown(CommunicatorObject* self, PyObject* args) extern "C" #endif static PyObject* -communicatorIsShutdown(CommunicatorObject* self) +communicatorIsShutdown(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); bool isShutdown; @@ -1023,7 +1027,7 @@ communicatorCreateAdmin(CommunicatorObject* self, PyObject* args) extern "C" #endif static PyObject* -communicatorGetAdmin(CommunicatorObject* self) +communicatorGetAdmin(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); Ice::ObjectPrx proxy; @@ -1146,7 +1150,7 @@ communicatorFindAdminFacet(CommunicatorObject* self, PyObject* args) extern "C" #endif static PyObject* -communicatorFindAllAdminFacets(CommunicatorObject* self) +communicatorFindAllAdminFacets(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); Ice::FacetMap facetMap; @@ -1265,7 +1269,7 @@ communicatorSetWrapper(CommunicatorObject* self, PyObject* args) extern "C" #endif static PyObject* -communicatorGetWrapper(CommunicatorObject* self) +communicatorGetWrapper(CommunicatorObject* self, PyObject* /*args*/) { assert(self->wrapper); Py_INCREF(self->wrapper); @@ -1276,7 +1280,7 @@ communicatorGetWrapper(CommunicatorObject* self) extern "C" #endif static PyObject* -communicatorGetProperties(CommunicatorObject* self) +communicatorGetProperties(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); Ice::PropertiesPtr properties; @@ -1297,7 +1301,7 @@ communicatorGetProperties(CommunicatorObject* self) extern "C" #endif static PyObject* -communicatorGetLogger(CommunicatorObject* self) +communicatorGetLogger(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); Ice::LoggerPtr logger; @@ -1401,7 +1405,7 @@ communicatorFindObjectFactory(CommunicatorObject* self, PyObject* args) extern "C" #endif static PyObject* -communicatorGetValueFactoryManager(CommunicatorObject* self) +communicatorGetValueFactoryManager(CommunicatorObject* self, PyObject* /*args*/) { ValueFactoryManagerPtr vfm = ValueFactoryManagerPtr::dynamicCast((*self->communicator)->getValueFactoryManager()); @@ -1412,7 +1416,7 @@ communicatorGetValueFactoryManager(CommunicatorObject* self) extern "C" #endif static PyObject* -communicatorGetImplicitContext(CommunicatorObject* self) +communicatorGetImplicitContext(CommunicatorObject* self, PyObject* /*args*/) { Ice::ImplicitContextPtr implicitContext = (*self->communicator)->getImplicitContext(); @@ -1580,7 +1584,7 @@ communicatorCreateObjectAdapterWithRouter(CommunicatorObject* self, PyObject* ar extern "C" #endif static PyObject* -communicatorGetDefaultRouter(CommunicatorObject* self) +communicatorGetDefaultRouter(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); Ice::RouterPrx router; @@ -1644,7 +1648,7 @@ communicatorSetDefaultRouter(CommunicatorObject* self, PyObject* args) extern "C" #endif static PyObject* -communicatorGetDefaultLocator(CommunicatorObject* self) +communicatorGetDefaultLocator(CommunicatorObject* self, PyObject* /*args*/) { assert(self->communicator); Ice::LocatorPrx locator; diff --git a/python/modules/IcePy/Connection.cpp b/python/modules/IcePy/Connection.cpp index 73316af5a60..3bd66da1ba9 100644 --- a/python/modules/IcePy/Connection.cpp +++ b/python/modules/IcePy/Connection.cpp @@ -19,6 +19,10 @@ using namespace std; using namespace IcePy; +#if defined(__GNUC__) && ((__GNUC__ >= 8)) +# pragma GCC diagnostic ignored "-Wcast-function-type" +#endif + namespace { @@ -436,7 +440,7 @@ connectionSetAdapter(ConnectionObject* self, PyObject* args) extern "C" #endif static PyObject* -connectionGetAdapter(ConnectionObject* self) +connectionGetAdapter(ConnectionObject* self, PyObject* /*args*/) { Ice::ObjectAdapterPtr adapter; @@ -500,7 +504,7 @@ connectionFlushBatchRequests(ConnectionObject* self, PyObject* args) extern "C" #endif static PyObject* -connectionFlushBatchRequestsAsync(ConnectionObject* self, PyObject* args, PyObject* /*kwds*/) +connectionFlushBatchRequestsAsync(ConnectionObject* self, PyObject* args) { PyObject* compressBatchType = lookupType("Ice.CompressBatch"); PyObject* compressBatch; @@ -746,7 +750,7 @@ connectionSetHeartbeatCallback(ConnectionObject* self, PyObject* args) extern "C" #endif static PyObject* -connectionHeartbeat(ConnectionObject* self) +connectionHeartbeat(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); try @@ -940,7 +944,7 @@ connectionSetACM(ConnectionObject* self, PyObject* args) extern "C" #endif static PyObject* -connectionGetACM(ConnectionObject* self) +connectionGetACM(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); @@ -1013,7 +1017,7 @@ connectionGetACM(ConnectionObject* self) extern "C" #endif static PyObject* -connectionType(ConnectionObject* self) +connectionType(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); string type; @@ -1034,7 +1038,7 @@ connectionType(ConnectionObject* self) extern "C" #endif static PyObject* -connectionTimeout(ConnectionObject* self) +connectionTimeout(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); int timeout; @@ -1055,7 +1059,7 @@ connectionTimeout(ConnectionObject* self) extern "C" #endif static PyObject* -connectionToString(ConnectionObject* self) +connectionToString(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); string str; @@ -1076,7 +1080,7 @@ connectionToString(ConnectionObject* self) extern "C" #endif static PyObject* -connectionGetInfo(ConnectionObject* self) +connectionGetInfo(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); try @@ -1095,7 +1099,7 @@ connectionGetInfo(ConnectionObject* self) extern "C" #endif static PyObject* -connectionGetEndpoint(ConnectionObject* self) +connectionGetEndpoint(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); try @@ -1142,7 +1146,7 @@ connectionSetBufferSize(ConnectionObject* self, PyObject* args) extern "C" #endif static PyObject* -connectionThrowException(ConnectionObject* self) +connectionThrowException(ConnectionObject* self, PyObject* /*args*/) { assert(self->connection); try diff --git a/python/modules/IcePy/ConnectionInfo.cpp b/python/modules/IcePy/ConnectionInfo.cpp index 657042628a3..ee05b5560ce 100644 --- a/python/modules/IcePy/ConnectionInfo.cpp +++ b/python/modules/IcePy/ConnectionInfo.cpp @@ -48,7 +48,7 @@ connectionInfoDealloc(ConnectionInfoObject* self) extern "C" #endif static PyObject* -connectionInfoGetUnderlying(ConnectionInfoObject* self) +connectionInfoGetUnderlying(ConnectionInfoObject* self, PyObject* /*args*/) { return createConnectionInfo((*self->connectionInfo)->underlying); } @@ -57,7 +57,7 @@ connectionInfoGetUnderlying(ConnectionInfoObject* self) extern "C" #endif static PyObject* -connectionInfoGetIncoming(ConnectionInfoObject* self) +connectionInfoGetIncoming(ConnectionInfoObject* self, PyObject* /*args*/) { return (*self->connectionInfo)->incoming ? incTrue() : incFalse(); } @@ -66,7 +66,7 @@ connectionInfoGetIncoming(ConnectionInfoObject* self) extern "C" #endif static PyObject* -connectionInfoGetAdapterName(ConnectionInfoObject* self) +connectionInfoGetAdapterName(ConnectionInfoObject* self, PyObject* /*args*/) { return createString((*self->connectionInfo)->adapterName); } @@ -75,7 +75,7 @@ connectionInfoGetAdapterName(ConnectionInfoObject* self) extern "C" #endif static PyObject* -ipConnectionInfoGetLocalAddress(ConnectionInfoObject* self) +ipConnectionInfoGetLocalAddress(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::IPConnectionInfoPtr info = Ice::IPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -86,7 +86,7 @@ ipConnectionInfoGetLocalAddress(ConnectionInfoObject* self) extern "C" #endif static PyObject* -ipConnectionInfoGetLocalPort(ConnectionInfoObject* self) +ipConnectionInfoGetLocalPort(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::IPConnectionInfoPtr info = Ice::IPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -97,7 +97,7 @@ ipConnectionInfoGetLocalPort(ConnectionInfoObject* self) extern "C" #endif static PyObject* -ipConnectionInfoGetRemoteAddress(ConnectionInfoObject* self) +ipConnectionInfoGetRemoteAddress(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::IPConnectionInfoPtr info = Ice::IPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -108,7 +108,7 @@ ipConnectionInfoGetRemoteAddress(ConnectionInfoObject* self) extern "C" #endif static PyObject* -ipConnectionInfoGetRemotePort(ConnectionInfoObject* self) +ipConnectionInfoGetRemotePort(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::IPConnectionInfoPtr info = Ice::IPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -119,7 +119,7 @@ ipConnectionInfoGetRemotePort(ConnectionInfoObject* self) extern "C" #endif static PyObject* -tcpConnectionInfoGetRcvSize(ConnectionInfoObject* self) +tcpConnectionInfoGetRcvSize(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::TCPConnectionInfoPtr info = Ice::TCPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -130,7 +130,7 @@ tcpConnectionInfoGetRcvSize(ConnectionInfoObject* self) extern "C" #endif static PyObject* -tcpConnectionInfoGetSndSize(ConnectionInfoObject* self) +tcpConnectionInfoGetSndSize(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::TCPConnectionInfoPtr info = Ice::TCPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -141,7 +141,7 @@ tcpConnectionInfoGetSndSize(ConnectionInfoObject* self) extern "C" #endif static PyObject* -udpConnectionInfoGetMcastAddress(ConnectionInfoObject* self) +udpConnectionInfoGetMcastAddress(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -152,7 +152,7 @@ udpConnectionInfoGetMcastAddress(ConnectionInfoObject* self) extern "C" #endif static PyObject* -udpConnectionInfoGetMcastPort(ConnectionInfoObject* self, void* /*member*/) +udpConnectionInfoGetMcastPort(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -163,7 +163,7 @@ udpConnectionInfoGetMcastPort(ConnectionInfoObject* self, void* /*member*/) extern "C" #endif static PyObject* -udpConnectionInfoGetRcvSize(ConnectionInfoObject* self) +udpConnectionInfoGetRcvSize(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -174,7 +174,7 @@ udpConnectionInfoGetRcvSize(ConnectionInfoObject* self) extern "C" #endif static PyObject* -udpConnectionInfoGetSndSize(ConnectionInfoObject* self) +udpConnectionInfoGetSndSize(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -185,7 +185,7 @@ udpConnectionInfoGetSndSize(ConnectionInfoObject* self) extern "C" #endif static PyObject* -wsConnectionInfoGetHeaders(ConnectionInfoObject* self) +wsConnectionInfoGetHeaders(ConnectionInfoObject* self, PyObject* /*args*/) { Ice::WSConnectionInfoPtr info = Ice::WSConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -211,7 +211,7 @@ wsConnectionInfoGetHeaders(ConnectionInfoObject* self) extern "C" #endif static PyObject* -sslConnectionInfoGetCipher(ConnectionInfoObject* self) +sslConnectionInfoGetCipher(ConnectionInfoObject* self, PyObject* /*args*/) { IceSSL::ConnectionInfoPtr info = IceSSL::ConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -222,7 +222,7 @@ sslConnectionInfoGetCipher(ConnectionInfoObject* self) extern "C" #endif static PyObject* -sslConnectionInfoGetCerts(ConnectionInfoObject* self) +sslConnectionInfoGetCerts(ConnectionInfoObject* self, PyObject* /*args*/) { IceSSL::ConnectionInfoPtr info = IceSSL::ConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); @@ -240,7 +240,7 @@ sslConnectionInfoGetCerts(ConnectionInfoObject* self) extern "C" #endif static PyObject* -sslConnectionInfoGetVerified(ConnectionInfoObject* self) +sslConnectionInfoGetVerified(ConnectionInfoObject* self, PyObject* /*args*/) { IceSSL::ConnectionInfoPtr info = IceSSL::ConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); diff --git a/python/modules/IcePy/Endpoint.cpp b/python/modules/IcePy/Endpoint.cpp index 967b5951abe..a92396f8324 100644 --- a/python/modules/IcePy/Endpoint.cpp +++ b/python/modules/IcePy/Endpoint.cpp @@ -100,7 +100,7 @@ endpointCompare(EndpointObject* p1, PyObject* other, int op) extern "C" #endif static PyObject* -endpointToString(EndpointObject* self) +endpointToString(EndpointObject* self, PyObject* /*args*/) { assert(self->endpoint); try @@ -121,14 +121,14 @@ extern "C" static PyObject* endpointRepr(EndpointObject* self) { - return endpointToString(self); + return endpointToString(self, 0); } #ifdef WIN32 extern "C" #endif static PyObject* -endpointGetInfo(EndpointObject* self) +endpointGetInfo(EndpointObject* self, PyObject* /*args*/) { assert(self->endpoint); try diff --git a/python/modules/IcePy/EndpointInfo.cpp b/python/modules/IcePy/EndpointInfo.cpp index 3c5cbbb2b5e..4e525e16c51 100644 --- a/python/modules/IcePy/EndpointInfo.cpp +++ b/python/modules/IcePy/EndpointInfo.cpp @@ -49,7 +49,7 @@ endpointInfoDealloc(EndpointInfoObject* self) extern "C" #endif static PyObject* -endpointInfoType(EndpointInfoObject* self) +endpointInfoType(EndpointInfoObject* self, PyObject* /*args*/) { assert(self->endpointInfo); try @@ -71,7 +71,7 @@ endpointInfoType(EndpointInfoObject* self) extern "C" #endif static PyObject* -endpointInfoDatagram(EndpointInfoObject* self) +endpointInfoDatagram(EndpointInfoObject* self, PyObject* /*args*/) { assert(self->endpointInfo); PyObject* b; @@ -96,7 +96,7 @@ endpointInfoDatagram(EndpointInfoObject* self) extern "C" #endif static PyObject* -endpointInfoSecure(EndpointInfoObject* self) +endpointInfoSecure(EndpointInfoObject* self, PyObject* /*args*/) { assert(self->endpointInfo); PyObject* b; @@ -118,7 +118,7 @@ endpointInfoSecure(EndpointInfoObject* self) extern "C" #endif static PyObject* -endpointInfoGetUnderlying(EndpointInfoObject* self) +endpointInfoGetUnderlying(EndpointInfoObject* self, PyObject* /*args*/) { return createEndpointInfo((*self->endpointInfo)->underlying); } @@ -127,7 +127,7 @@ endpointInfoGetUnderlying(EndpointInfoObject* self) extern "C" #endif static PyObject* -endpointInfoGetTimeout(EndpointInfoObject* self) +endpointInfoGetTimeout(EndpointInfoObject* self, PyObject* /*args*/) { return PyLong_FromLong((*self->endpointInfo)->timeout); } @@ -136,7 +136,7 @@ endpointInfoGetTimeout(EndpointInfoObject* self) extern "C" #endif static PyObject* -endpointInfoGetCompress(EndpointInfoObject* self) +endpointInfoGetCompress(EndpointInfoObject* self, PyObject* /*args*/) { return (*self->endpointInfo)->compress ? incTrue() : incFalse(); } @@ -145,7 +145,7 @@ endpointInfoGetCompress(EndpointInfoObject* self) extern "C" #endif static PyObject* -ipEndpointInfoGetHost(EndpointInfoObject* self) +ipEndpointInfoGetHost(EndpointInfoObject* self, PyObject* /*args*/) { Ice::IPEndpointInfoPtr info = Ice::IPEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); @@ -156,7 +156,7 @@ ipEndpointInfoGetHost(EndpointInfoObject* self) extern "C" #endif static PyObject* -ipEndpointInfoGetSourceAddress(EndpointInfoObject* self) +ipEndpointInfoGetSourceAddress(EndpointInfoObject* self, PyObject* /*args*/) { Ice::IPEndpointInfoPtr info = Ice::IPEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); @@ -167,7 +167,7 @@ ipEndpointInfoGetSourceAddress(EndpointInfoObject* self) extern "C" #endif static PyObject* -ipEndpointInfoGetPort(EndpointInfoObject* self) +ipEndpointInfoGetPort(EndpointInfoObject* self, PyObject* /*args*/) { Ice::IPEndpointInfoPtr info = Ice::IPEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); @@ -178,7 +178,7 @@ ipEndpointInfoGetPort(EndpointInfoObject* self) extern "C" #endif static PyObject* -udpEndpointInfoGetMcastInterface(EndpointInfoObject* self) +udpEndpointInfoGetMcastInterface(EndpointInfoObject* self, PyObject* /*args*/) { Ice::UDPEndpointInfoPtr info = Ice::UDPEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); @@ -189,7 +189,7 @@ udpEndpointInfoGetMcastInterface(EndpointInfoObject* self) extern "C" #endif static PyObject* -udpEndpointInfoGetMcastTtl(EndpointInfoObject* self) +udpEndpointInfoGetMcastTtl(EndpointInfoObject* self, PyObject* /*args*/) { Ice::UDPEndpointInfoPtr info = Ice::UDPEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); @@ -200,7 +200,7 @@ udpEndpointInfoGetMcastTtl(EndpointInfoObject* self) extern "C" #endif static PyObject* -wsEndpointInfoGetResource(EndpointInfoObject* self) +wsEndpointInfoGetResource(EndpointInfoObject* self, PyObject* /*args*/) { Ice::WSEndpointInfoPtr info = Ice::WSEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); @@ -211,7 +211,7 @@ wsEndpointInfoGetResource(EndpointInfoObject* self) extern "C" #endif static PyObject* -opaqueEndpointInfoGetRawBytes(EndpointInfoObject* self) +opaqueEndpointInfoGetRawBytes(EndpointInfoObject* self, PyObject* /*args*/) { Ice::OpaqueEndpointInfoPtr info = Ice::OpaqueEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); @@ -228,7 +228,7 @@ opaqueEndpointInfoGetRawBytes(EndpointInfoObject* self) extern "C" #endif static PyObject* -opaqueEndpointInfoGetRawEncoding(EndpointInfoObject* self) +opaqueEndpointInfoGetRawEncoding(EndpointInfoObject* self, PyObject* /*args*/) { Ice::OpaqueEndpointInfoPtr info = Ice::OpaqueEndpointInfoPtr::dynamicCast(*self->endpointInfo); assert(info); diff --git a/python/modules/IcePy/ImplicitContext.cpp b/python/modules/IcePy/ImplicitContext.cpp index ca05e859048..4383e290874 100644 --- a/python/modules/IcePy/ImplicitContext.cpp +++ b/python/modules/IcePy/ImplicitContext.cpp @@ -109,7 +109,7 @@ implicitContextCompare(ImplicitContextObject* c1, PyObject* other, int op) extern "C" #endif static PyObject* -implicitContextGetContext(ImplicitContextObject* self) +implicitContextGetContext(ImplicitContextObject* self, PyObject* /*args*/) { Ice::Context ctx = (*self->implicitContext)->getContext(); @@ -284,7 +284,7 @@ implicitContextRemove(ImplicitContextObject* self, PyObject* args) static PyMethodDef ImplicitContextMethods[] = { - { STRCAST("getContext"), reinterpret_cast<PyCFunction>(implicitContextGetContext), METH_VARARGS, + { STRCAST("getContext"), reinterpret_cast<PyCFunction>(implicitContextGetContext), METH_NOARGS, PyDoc_STR(STRCAST("getContext() -> Ice.Context")) }, { STRCAST("setContext"), reinterpret_cast<PyCFunction>(implicitContextSetContext), METH_VARARGS, PyDoc_STR(STRCAST("setContext(ctx) -> string")) }, diff --git a/python/modules/IcePy/Init.cpp b/python/modules/IcePy/Init.cpp index be1b2647828..9588d2b7ee2 100644 --- a/python/modules/IcePy/Init.cpp +++ b/python/modules/IcePy/Init.cpp @@ -28,7 +28,7 @@ using namespace std; using namespace IcePy; -extern "C" PyObject* IcePy_cleanup(PyObject*); +extern "C" PyObject* IcePy_cleanup(PyObject*, PyObject*); static PyMethodDef methods[] = { @@ -239,7 +239,7 @@ initIcePy(void) extern "C" PyObject* -IcePy_cleanup(PyObject* /*self*/) +IcePy_cleanup(PyObject* /*self*/, PyObject* /*args*/) { cleanupLogger(); diff --git a/python/modules/IcePy/Logger.cpp b/python/modules/IcePy/Logger.cpp index f4e80a423f8..ce11d007864 100644 --- a/python/modules/IcePy/Logger.cpp +++ b/python/modules/IcePy/Logger.cpp @@ -282,7 +282,7 @@ loggerError(LoggerObject* self, PyObject* args) extern "C" #endif static PyObject* -loggerGetPrefix(LoggerObject* self) +loggerGetPrefix(LoggerObject* self, PyObject* /*args*/) { string prefix; @@ -456,7 +456,7 @@ IcePy::createLogger(const Ice::LoggerPtr& logger) extern "C" PyObject* -IcePy_getProcessLogger(PyObject* /*self*/) +IcePy_getProcessLogger(PyObject* /*self*/, PyObject* /*args*/) { Ice::LoggerPtr logger; try diff --git a/python/modules/IcePy/Logger.h b/python/modules/IcePy/Logger.h index 83d762c33bc..050412347c8 100644 --- a/python/modules/IcePy/Logger.h +++ b/python/modules/IcePy/Logger.h @@ -48,7 +48,7 @@ PyObject* createLogger(const Ice::LoggerPtr&); } -extern "C" PyObject* IcePy_getProcessLogger(PyObject*); +extern "C" PyObject* IcePy_getProcessLogger(PyObject*, PyObject*); extern "C" PyObject* IcePy_setProcessLogger(PyObject*, PyObject*); #endif diff --git a/python/modules/IcePy/ObjectAdapter.cpp b/python/modules/IcePy/ObjectAdapter.cpp index d74f5b809e0..3b98026c77a 100644 --- a/python/modules/IcePy/ObjectAdapter.cpp +++ b/python/modules/IcePy/ObjectAdapter.cpp @@ -326,7 +326,7 @@ adapterDealloc(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterGetName(ObjectAdapterObject* self) +adapterGetName(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); string name; @@ -347,7 +347,7 @@ adapterGetName(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterGetCommunicator(ObjectAdapterObject* self) +adapterGetCommunicator(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); Ice::CommunicatorPtr communicator; @@ -368,7 +368,7 @@ adapterGetCommunicator(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterActivate(ObjectAdapterObject* self) +adapterActivate(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); try @@ -399,7 +399,7 @@ adapterActivate(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterHold(ObjectAdapterObject* self) +adapterHold(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); try @@ -501,7 +501,7 @@ adapterWaitForHold(ObjectAdapterObject* self, PyObject* args) extern "C" #endif static PyObject* -adapterDeactivate(ObjectAdapterObject* self) +adapterDeactivate(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); try @@ -607,7 +607,7 @@ adapterWaitForDeactivate(ObjectAdapterObject* self, PyObject* args) extern "C" #endif static PyObject* -adapterIsDeactivated(ObjectAdapterObject* self) +adapterIsDeactivated(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); try @@ -628,7 +628,7 @@ adapterIsDeactivated(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterDestroy(ObjectAdapterObject* self) +adapterDestroy(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); try @@ -1515,7 +1515,7 @@ adapterSetLocator(ObjectAdapterObject* self, PyObject* args) extern "C" #endif static PyObject* -adapterGetLocator(ObjectAdapterObject* self) +adapterGetLocator(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); Ice::LocatorPrx locator; @@ -1544,7 +1544,7 @@ adapterGetLocator(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterGetEndpoints(ObjectAdapterObject* self) +adapterGetEndpoints(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); @@ -1579,7 +1579,7 @@ adapterGetEndpoints(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterRefreshPublishedEndpoints(ObjectAdapterObject* self) +adapterRefreshPublishedEndpoints(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); try @@ -1601,7 +1601,7 @@ adapterRefreshPublishedEndpoints(ObjectAdapterObject* self) extern "C" #endif static PyObject* -adapterGetPublishedEndpoints(ObjectAdapterObject* self) +adapterGetPublishedEndpoints(ObjectAdapterObject* self, PyObject* /*args*/) { assert(self->adapter); diff --git a/python/modules/IcePy/Operation.cpp b/python/modules/IcePy/Operation.cpp index b0ebd316a80..418b67dca39 100644 --- a/python/modules/IcePy/Operation.cpp +++ b/python/modules/IcePy/Operation.cpp @@ -855,7 +855,7 @@ asyncResultDealloc(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultGetCommunicator(AsyncResultObject* self) +asyncResultGetCommunicator(AsyncResultObject* self, PyObject* /*args*/) { if(self->communicator) { @@ -869,7 +869,7 @@ asyncResultGetCommunicator(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultCancel(AsyncResultObject* self) +asyncResultCancel(AsyncResultObject* self, PyObject* /*args*/) { try { @@ -887,7 +887,7 @@ asyncResultCancel(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultGetConnection(AsyncResultObject* self) +asyncResultGetConnection(AsyncResultObject* self, PyObject* /*args*/) { if(self->connection) { @@ -901,7 +901,7 @@ asyncResultGetConnection(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultGetProxy(AsyncResultObject* self) +asyncResultGetProxy(AsyncResultObject* self, PyObject* /*args*/) { if(self->proxy) { @@ -915,7 +915,7 @@ asyncResultGetProxy(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultIsCompleted(AsyncResultObject* self) +asyncResultIsCompleted(AsyncResultObject* self, PyObject* /*args*/) { bool b = false; @@ -936,7 +936,7 @@ asyncResultIsCompleted(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultWaitForCompleted(AsyncResultObject* self) +asyncResultWaitForCompleted(AsyncResultObject* self, PyObject* /*args*/) { AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. try @@ -956,7 +956,7 @@ asyncResultWaitForCompleted(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultIsSent(AsyncResultObject* self) +asyncResultIsSent(AsyncResultObject* self, PyObject* /*args*/) { bool b = false; @@ -977,7 +977,7 @@ asyncResultIsSent(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultWaitForSent(AsyncResultObject* self) +asyncResultWaitForSent(AsyncResultObject* self, PyObject* /*args*/) { AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. try @@ -997,7 +997,7 @@ asyncResultWaitForSent(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultThrowLocalException(AsyncResultObject* self) +asyncResultThrowLocalException(AsyncResultObject* self, PyObject* /*args*/) { try { @@ -1021,7 +1021,7 @@ asyncResultThrowLocalException(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultSentSynchronously(AsyncResultObject* self) +asyncResultSentSynchronously(AsyncResultObject* self, PyObject* /*args*/) { bool b = false; @@ -1042,7 +1042,7 @@ asyncResultSentSynchronously(AsyncResultObject* self) extern "C" #endif static PyObject* -asyncResultGetOperation(AsyncResultObject* self) +asyncResultGetOperation(AsyncResultObject* self, PyObject* /*args*/) { string op; diff --git a/python/modules/IcePy/Properties.cpp b/python/modules/IcePy/Properties.cpp index 532a01b2255..739d4722bef 100644 --- a/python/modules/IcePy/Properties.cpp +++ b/python/modules/IcePy/Properties.cpp @@ -490,7 +490,7 @@ propertiesSetProperty(PropertiesObject* self, PyObject* args) extern "C" #endif static PyObject* -propertiesGetCommandLineOptions(PropertiesObject* self) +propertiesGetCommandLineOptions(PropertiesObject* self, PyObject* /*args*/) { Ice::StringSeq options; assert(self->properties); @@ -647,7 +647,7 @@ propertiesLoad(PropertiesObject* self, PyObject* args) extern "C" #endif static PyObject* -propertiesClone(PropertiesObject* self) +propertiesClone(PropertiesObject* self, PyObject* /*args*/) { Ice::PropertiesPtr properties; assert(self->properties); diff --git a/python/modules/IcePy/Proxy.cpp b/python/modules/IcePy/Proxy.cpp index 9be5c623df9..9803175d39a 100644 --- a/python/modules/IcePy/Proxy.cpp +++ b/python/modules/IcePy/Proxy.cpp @@ -23,6 +23,10 @@ using namespace std; using namespace IcePy; +#if defined(__GNUC__) && ((__GNUC__ >= 8)) +# pragma GCC diagnostic ignored "-Wcast-function-type" +#endif + namespace IcePy { @@ -147,7 +151,7 @@ proxyCompare(ProxyObject* p1, PyObject* other, int op) extern "C" #endif static PyObject* -proxyRepr(ProxyObject* self) +proxyRepr(ProxyObject* self, PyObject* /*args*/) { string str = (*self->proxy)->ice_toString(); return createString(str); @@ -166,7 +170,7 @@ proxyHash(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceGetCommunicator(ProxyObject* self) +proxyIceGetCommunicator(ProxyObject* self, PyObject* /*args*/) { return getCommunicatorWrapper(*self->communicator); } @@ -507,7 +511,7 @@ proxyEndIceId(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetIdentity(ProxyObject* self) +proxyIceGetIdentity(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -565,7 +569,7 @@ proxyIceIdentity(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetContext(ProxyObject* self) +proxyIceGetContext(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -626,7 +630,7 @@ proxyIceContext(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetFacet(ProxyObject* self) +proxyIceGetFacet(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -682,7 +686,7 @@ proxyIceFacet(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetAdapterId(ProxyObject* self) +proxyIceGetAdapterId(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -738,7 +742,7 @@ proxyIceAdapterId(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetEndpoints(ProxyObject* self) +proxyIceGetEndpoints(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -813,7 +817,7 @@ proxyIceEndpoints(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetLocatorCacheTimeout(ProxyObject* self) +proxyIceGetLocatorCacheTimeout(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -833,7 +837,7 @@ proxyIceGetLocatorCacheTimeout(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceGetInvocationTimeout(ProxyObject* self) +proxyIceGetInvocationTimeout(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -853,7 +857,7 @@ proxyIceGetInvocationTimeout(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceGetConnectionId(ProxyObject* self) +proxyIceGetConnectionId(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -939,7 +943,7 @@ proxyIceInvocationTimeout(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceIsConnectionCached(ProxyObject* self) +proxyIceIsConnectionCached(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -996,7 +1000,7 @@ proxyIceConnectionCached(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetEndpointSelection(ProxyObject* self) +proxyIceGetEndpointSelection(ProxyObject* self, PyObject* /*args*/) { PyObject* cls = lookupType("Ice.EndpointSelectionType"); assert(cls); @@ -1084,7 +1088,7 @@ proxyIceEndpointSelection(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceIsSecure(ProxyObject* self) +proxyIceIsSecure(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1141,7 +1145,7 @@ proxyIceSecure(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetEncodingVersion(ProxyObject* self) +proxyIceGetEncodingVersion(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1200,7 +1204,7 @@ proxyIceEncodingVersion(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceIsPreferSecure(ProxyObject* self) +proxyIceIsPreferSecure(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1257,7 +1261,7 @@ proxyIcePreferSecure(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetRouter(ProxyObject* self) +proxyIceGetRouter(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1323,7 +1327,7 @@ proxyIceRouter(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetLocator(ProxyObject* self) +proxyIceGetLocator(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1389,7 +1393,7 @@ proxyIceLocator(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceTwoway(ProxyObject* self) +proxyIceTwoway(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1411,7 +1415,7 @@ proxyIceTwoway(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceIsTwoway(ProxyObject* self) +proxyIceIsTwoway(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1434,7 +1438,7 @@ proxyIceIsTwoway(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceOneway(ProxyObject* self) +proxyIceOneway(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1456,7 +1460,7 @@ proxyIceOneway(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceIsOneway(ProxyObject* self) +proxyIceIsOneway(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1479,7 +1483,7 @@ proxyIceIsOneway(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceBatchOneway(ProxyObject* self) +proxyIceBatchOneway(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1501,7 +1505,7 @@ proxyIceBatchOneway(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceIsBatchOneway(ProxyObject* self) +proxyIceIsBatchOneway(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1524,7 +1528,7 @@ proxyIceIsBatchOneway(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceDatagram(ProxyObject* self) +proxyIceDatagram(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1546,7 +1550,7 @@ proxyIceDatagram(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceIsDatagram(ProxyObject* self) +proxyIceIsDatagram(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1569,7 +1573,7 @@ proxyIceIsDatagram(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceBatchDatagram(ProxyObject* self) +proxyIceBatchDatagram(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1591,7 +1595,7 @@ proxyIceBatchDatagram(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceIsBatchDatagram(ProxyObject* self) +proxyIceIsBatchDatagram(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1648,7 +1652,7 @@ proxyIceCompress(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetCompress(ProxyObject* self) +proxyIceGetCompress(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1711,7 +1715,7 @@ proxyIceTimeout(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetTimeout(ProxyObject* self) +proxyIceGetTimeout(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1739,7 +1743,7 @@ proxyIceGetTimeout(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceIsCollocationOptimized(ProxyObject* self) +proxyIceIsCollocationOptimized(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -1864,7 +1868,7 @@ proxyIceFixed(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetConnection(ProxyObject* self) +proxyIceGetConnection(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -2043,7 +2047,7 @@ proxyEndIceGetConnection(ProxyObject* self, PyObject* args) extern "C" #endif static PyObject* -proxyIceGetCachedConnection(ProxyObject* self) +proxyIceGetCachedConnection(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -2073,7 +2077,7 @@ proxyIceGetCachedConnection(ProxyObject* self) extern "C" #endif static PyObject* -proxyIceFlushBatchRequests(ProxyObject* self) +proxyIceFlushBatchRequests(ProxyObject* self, PyObject* /*args*/) { assert(self->proxy); @@ -2624,7 +2628,7 @@ proxyUncheckedCast(PyObject* /*self*/, PyObject* args) extern "C" #endif static PyObject* -proxyIceStaticId(PyObject* /*self*/) +proxyIceStaticId(PyObject* /*self*/, PyObject* /*args*/) { return createString(Ice::Object::ice_staticId()); } diff --git a/python/modules/IcePy/Util.cpp b/python/modules/IcePy/Util.cpp index 077f10be606..6b9729a1ee1 100644 --- a/python/modules/IcePy/Util.cpp +++ b/python/modules/IcePy/Util.cpp @@ -1201,7 +1201,7 @@ IcePy::callMethod(PyObject* method, PyObject* arg1, PyObject* arg2) extern "C" PyObject* -IcePy_stringVersion(PyObject* /*self*/) +IcePy_stringVersion(PyObject* /*self*/, PyObject* /*args*/) { string s = ICE_STRING_VERSION; return IcePy::createString(s); @@ -1209,28 +1209,28 @@ IcePy_stringVersion(PyObject* /*self*/) extern "C" PyObject* -IcePy_intVersion(PyObject* /*self*/) +IcePy_intVersion(PyObject* /*self*/, PyObject* /*args*/) { return PyLong_FromLong(ICE_INT_VERSION); } extern "C" PyObject* -IcePy_currentProtocol(PyObject* /*self*/) +IcePy_currentProtocol(PyObject* /*self*/, PyObject* /*args*/) { return IcePy::createProtocolVersion(Ice::currentProtocol); } extern "C" PyObject* -IcePy_currentProtocolEncoding(PyObject* /*self*/) +IcePy_currentProtocolEncoding(PyObject* /*self*/, PyObject* /*args*/) { return IcePy::createEncodingVersion(Ice::currentProtocolEncoding); } extern "C" PyObject* -IcePy_currentEncoding(PyObject* /*self*/) +IcePy_currentEncoding(PyObject* /*self*/, PyObject* /*args*/) { return IcePy::createEncodingVersion(Ice::currentEncoding); } @@ -1265,7 +1265,7 @@ IcePy_stringToEncodingVersion(PyObject* /*self*/, PyObject* args) extern "C" PyObject* -IcePy_generateUUID(PyObject* /*self*/) +IcePy_generateUUID(PyObject* /*self*/, PyObject* /*args*/) { string uuid = Ice::generateUUID(); return IcePy::createString(uuid); diff --git a/python/modules/IcePy/Util.h b/python/modules/IcePy/Util.h index c7171d75174..97269b77ed6 100644 --- a/python/modules/IcePy/Util.h +++ b/python/modules/IcePy/Util.h @@ -281,15 +281,15 @@ PyObject* callMethod(PyObject*, PyObject* = 0, PyObject* = 0); } -extern "C" PyObject* IcePy_stringVersion(PyObject*); -extern "C" PyObject* IcePy_intVersion(PyObject*); -extern "C" PyObject* IcePy_currentProtocol(PyObject*); -extern "C" PyObject* IcePy_currentProtocolEncoding(PyObject*); -extern "C" PyObject* IcePy_currentEncoding(PyObject*); +extern "C" PyObject* IcePy_stringVersion(PyObject*, PyObject*); +extern "C" PyObject* IcePy_intVersion(PyObject*, PyObject*); +extern "C" PyObject* IcePy_currentProtocol(PyObject*, PyObject*); +extern "C" PyObject* IcePy_currentProtocolEncoding(PyObject*, PyObject*); +extern "C" PyObject* IcePy_currentEncoding(PyObject*, PyObject*); extern "C" PyObject* IcePy_protocolVersionToString(PyObject*, PyObject*); extern "C" PyObject* IcePy_stringToProtocolVersion(PyObject*, PyObject*); extern "C" PyObject* IcePy_encodingVersionToString(PyObject*, PyObject*); extern "C" PyObject* IcePy_stringToEncodingVersion(PyObject*, PyObject*); -extern "C" PyObject* IcePy_generateUUID(PyObject*); +extern "C" PyObject* IcePy_generateUUID(PyObject*, PyObject*); #endif diff --git a/ruby/src/IceRuby/Util.h b/ruby/src/IceRuby/Util.h index 324237ef7ed..007abdbecc8 100644 --- a/ruby/src/IceRuby/Util.h +++ b/ruby/src/IceRuby/Util.h @@ -180,7 +180,10 @@ public: RF_0(Fun f) : _f(f) {} inline VALUE operator()() { return _f(); } - static inline VALUE call(RF_0* f) { return (*f)(); } + static inline VALUE call(VALUE f) + { + return (*reinterpret_cast<RF_0*>(f))(); + } private: @@ -192,7 +195,7 @@ inline VALUE callRuby(Fun fun) { typedef RF_0<Fun> RF; RF f(fun); - return callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + return callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1> @@ -202,7 +205,10 @@ public: RF_1(Fun f, T1 t1) : _f(f), _t1(t1) {} inline VALUE operator()() { return _f(_t1); } - static inline VALUE call(RF_1* f) { return (*f)(); } + static inline VALUE call(VALUE f) + { + return (*reinterpret_cast<RF_1*>(f))(); + } private: @@ -215,7 +221,7 @@ inline VALUE callRuby(Fun fun, T1 t1) { typedef RF_1<Fun, T1> RF; RF f(fun, t1); - return callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + return callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1, typename T2> @@ -225,7 +231,10 @@ public: RF_2(Fun f, T1 t1, T2 t2) : _f(f), _t1(t1), _t2(t2) {} inline VALUE operator()() { return _f(_t1, _t2); } - static inline VALUE call(RF_2* f) { return (*f)(); } + static inline VALUE call(VALUE f) + { + return (*reinterpret_cast<RF_2*>(f))(); + } private: @@ -239,7 +248,7 @@ inline VALUE callRuby(Fun fun, T1 t1, T2 t2) { typedef RF_2<Fun, T1, T2> RF; RF f(fun, t1, t2); - return callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + return callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1, typename T2, typename T3> @@ -249,7 +258,10 @@ public: RF_3(Fun f, T1 t1, T2 t2, T3 t3) : _f(f), _t1(t1), _t2(t2), _t3(t3) {} inline VALUE operator()() { return _f(_t1, _t2, _t3); } - static inline VALUE call(RF_3* f) { return (*f)(); } + static inline VALUE call(VALUE f) + { + return (*reinterpret_cast<RF_3*>(f))(); + } private: @@ -264,7 +276,7 @@ inline VALUE callRuby(Fun fun, T1 t1, T2 t2, T3 t3) { typedef RF_3<Fun, T1, T2, T3> RF; RF f(fun, t1, t2, t3); - return callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + return callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1, typename T2, typename T3, typename T4> @@ -274,7 +286,10 @@ public: RF_4(Fun f, T1 t1, T2 t2, T3 t3, T4 t4) : _f(f), _t1(t1), _t2(t2), _t3(t3), _t4(t4) {} inline VALUE operator()() { return _f(_t1, _t2, _t3, _t4); } - static inline VALUE call(RF_4* f) { return (*f)(); } + static inline VALUE call(VALUE f) + { + return (*reinterpret_cast<RF_4*>(f))(); + } private: @@ -290,7 +305,7 @@ inline VALUE callRuby(Fun fun, T1 t1, T2 t2, T3 t3, T4 t4) { typedef RF_4<Fun, T1, T2, T3, T4> RF; RF f(fun, t1, t2, t3, t4); - return callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + return callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } // @@ -321,7 +336,12 @@ public: RFV_0(Fun f) : _f(f) {} inline void operator()() { _f(); } - static inline VALUE call(RFV_0* f) { (*f)(); return Qnil; } + + static inline VALUE call(VALUE f) + { + (*reinterpret_cast<RFV_0*>(f))(); + return Qnil; + } private: @@ -333,7 +353,7 @@ inline void callRubyVoid(Fun fun) { typedef RFV_0<Fun> RF; RF f(fun); - callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1> @@ -343,7 +363,11 @@ public: RFV_1(Fun f, T1 t1) : _f(f), _t1(t1) {} inline void operator()() { _f(_t1); } - static inline VALUE call(RFV_1* f) { (*f)(); return Qnil; } + static inline VALUE call(VALUE f) + { + (*reinterpret_cast<RFV_1*>(f))(); + return Qnil; + } private: @@ -356,7 +380,7 @@ inline void callRubyVoid(Fun fun, T1 t1) { typedef RFV_1<Fun, T1> RF; RF f(fun, t1); - callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1, typename T2> @@ -366,7 +390,11 @@ public: RFV_2(Fun f, T1 t1, T2 t2) : _f(f), _t1(t1), _t2(t2) {} inline void operator()() { _f(_t1, _t2); } - static inline VALUE call(RFV_2* f) { (*f)(); return Qnil; } + static inline VALUE call(VALUE f) + { + (*reinterpret_cast<RFV_2*>(f))(); + return Qnil; + } private: @@ -380,7 +408,7 @@ inline void callRubyVoid(Fun fun, T1 t1, T2 t2) { typedef RFV_2<Fun, T1, T2> RF; RF f(fun, t1, t2); - callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1, typename T2, typename T3> @@ -390,7 +418,11 @@ public: RFV_3(Fun f, T1 t1, T2 t2, T3 t3) : _f(f), _t1(t1), _t2(t2), _t3(t3) {} inline void operator()() { _f(_t1, _t2, _t3); } - static inline VALUE call(RFV_3* f) { (*f)(); return Qnil; } + static inline VALUE call(VALUE f) + { + (*reinterpret_cast<RFV_3*>(f))(); + return Qnil; + } private: @@ -405,7 +437,7 @@ inline void callRubyVoid(Fun fun, T1 t1, T2 t2, T3 t3) { typedef RFV_3<Fun, T1, T2, T3> RF; RF f(fun, t1, t2, t3); - callProtected(RubyFunction(RF::call), reinterpret_cast<VALUE>(&f)); + callProtected(RF::call, reinterpret_cast<VALUE>(&f)); } template<typename Fun, typename T1, typename T2, typename T3, typename T4> @@ -415,7 +447,11 @@ public: RFV_4(Fun f, T1 t1, T2 t2, T3 t3, T4 t4) : _f(f), _t1(t1), _t2(t2), _t3(t3), _t4(t4) {} inline void operator()() { _f(_t1, _t2, _t3, _t4); } - static inline VALUE call(RFV_4* f) { (*f)(); return Qnil; } + static inline VALUE call(VALUE f) + { + (*reinterpret_cast<RFV_4*>(f))(); + return Qnil; + } private: |