From 86f71e2496dfd3c3eceabc5bc19a625419be549e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 2 Jul 2016 16:27:37 +0100 Subject: Demangle interface names for property lookup --- icespider/core/core.cpp | 5 ++++- icespider/unittests/testApp.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/icespider/core/core.cpp b/icespider/core/core.cpp index 3ada79c..b21a805 100644 --- a/icespider/core/core.cpp +++ b/icespider/core/core.cpp @@ -71,7 +71,10 @@ namespace IceSpider { Ice::ObjectPrx Core::getProxy(const char * type) const { - return communicator->propertyToProxy(type); + char * buf = __cxxabiv1::__cxa_demangle(type, NULL, NULL, NULL); + auto i = communicator->propertyToProxy(buf); + free(buf); + return i; } } diff --git a/icespider/unittests/testApp.cpp b/icespider/unittests/testApp.cpp index 71ae7d4..80dd6c1 100644 --- a/icespider/unittests/testApp.cpp +++ b/icespider/unittests/testApp.cpp @@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE( testCallMethods ) auto obj = adp->addWithUUID(new TestSerice()); adp->activate(); fprintf(stderr, "%s\n", obj->ice_id().c_str()); - communicator->getProperties()->setProperty("N13TestIceSpider7TestApiE", communicator->proxyToString(obj)); + communicator->getProperties()->setProperty("TestIceSpider::TestApi", communicator->proxyToString(obj)); TestRequest requestGetIndex(this, HttpMethod::GET, "/"); process(&requestGetIndex); -- cgit v1.2.3