summaryrefslogtreecommitdiff
path: root/cpp/src/IceBox/ServiceManagerI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2017-04-08 14:18:09 -0400
committerBernard Normier <bernard@zeroc.com>2017-04-08 14:18:09 -0400
commit325a3add54e95fd751163876b137492783476872 (patch)
treeec20a2dbcf35e4471c5ee2256739f5d59970d460 /cpp/src/IceBox/ServiceManagerI.cpp
parentICE-7768: fixed C++11 Blobject API (diff)
downloadice-325a3add54e95fd751163876b137492783476872.tar.bz2
ice-325a3add54e95fd751163876b137492783476872.tar.xz
ice-325a3add54e95fd751163876b137492783476872.zip
Fixed signature of IceBox Service factory function in C++11
Diffstat (limited to 'cpp/src/IceBox/ServiceManagerI.cpp')
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 77f88ff2cd7..5e1f76adc87 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -22,8 +22,14 @@ using namespace IceUtilInternal;
using namespace IceBox;
using namespace std;
-typedef IceBox::Service* (*SERVICE_FACTORY)(CommunicatorPtr);
-
+#ifdef ICE_CPP11_MAPPING
+typedef IceBox::Service* (*ServiceFactory)(const shared_ptr<Communicator>&);
+#else
+//
+// We copy the CommunicatorPtr to maintain compatibility with earlier releases
+//
+typedef IceBox::Service* (*ServiceFactory)(CommunicatorPtr);
+#endif
namespace
{
@@ -677,7 +683,7 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
# pragma report(disable, "1540-0216")
#endif
- SERVICE_FACTORY factory = reinterpret_cast<SERVICE_FACTORY>(sym);
+ ServiceFactory factory = reinterpret_cast<ServiceFactory>(sym);
try
{
info.service = ServicePtr(factory(_communicator));