summaryrefslogtreecommitdiff
path: root/python/modules/IcePy/ValueFactoryManager.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-01-26 21:52:52 +0100
committerJose <jose@zeroc.com>2017-01-26 21:52:52 +0100
commitf3eeced45abdcbb8af31569bf8cee55f0d2a3b4b (patch)
treef98f59d56e7185ee90d504cf077e57465655f7fd /python/modules/IcePy/ValueFactoryManager.cpp
parentFixed ICE-6920 - Communicator::destroy is now noexcept (diff)
downloadice-f3eeced45abdcbb8af31569bf8cee55f0d2a3b4b.tar.bz2
ice-f3eeced45abdcbb8af31569bf8cee55f0d2a3b4b.tar.xz
ice-f3eeced45abdcbb8af31569bf8cee55f0d2a3b4b.zip
Python: Ice.Value implementation
Diffstat (limited to 'python/modules/IcePy/ValueFactoryManager.cpp')
-rw-r--r--python/modules/IcePy/ValueFactoryManager.cpp33
1 files changed, 5 insertions, 28 deletions
diff --git a/python/modules/IcePy/ValueFactoryManager.cpp b/python/modules/IcePy/ValueFactoryManager.cpp
index d1f78ddbaad..5ef221b0d0e 100644
--- a/python/modules/IcePy/ValueFactoryManager.cpp
+++ b/python/modules/IcePy/ValueFactoryManager.cpp
@@ -32,25 +32,10 @@ struct ValueFactoryManagerObject
namespace
{
-ClassInfoPtr
-getClassInfo(const string& id)
+ValueInfoPtr
+getValueInfo(const string& id)
{
- ClassInfoPtr info;
-
- if(id == Ice::Object::ice_staticId())
- {
- //
- // When the ID is that of Ice::Object, it indicates that the stream has not
- // found a factory and is providing us an opportunity to preserve the object.
- //
- info = lookupClassInfo("::Ice::UnknownSlicedObject");
- }
- else
- {
- info = lookupClassInfo(id);
- }
-
- return info;
+ return id == Ice::Object::ice_staticId() ? lookupValueInfo("::Ice::UnknownSlicedValue") : lookupValueInfo(id);
}
}
@@ -229,7 +214,7 @@ IcePy::FactoryWrapper::create(const string& id)
//
// Get the type information.
//
- ClassInfoPtr info = getClassInfo(id);
+ ValueInfoPtr info = getValueInfo(id);
if(!info)
{
@@ -298,7 +283,7 @@ IcePy::DefaultValueFactory::create(const string& id)
//
// Get the type information.
//
- ClassInfoPtr info = getClassInfo(id);
+ ValueInfoPtr info = getValueInfo(id);
if(!info)
{
@@ -306,14 +291,6 @@ IcePy::DefaultValueFactory::create(const string& id)
}
//
- // If the requested type is an abstract class, then we give up.
- //
- if(info->isAbstract)
- {
- return 0;
- }
-
- //
// Instantiate the object.
//
PyTypeObject* type = reinterpret_cast<PyTypeObject*>(info->pythonType.get());