diff options
author | Mark Spruiell <mes@zeroc.com> | 2009-01-15 14:45:04 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2009-01-15 14:45:04 -0800 |
commit | cd75146bcf4be80cbd8b1a541e1e4dda4828a463 (patch) | |
tree | 7d9b5152c47a2ad8c6c7b0ab126f579a19102e9b /php/src/IcePHP/Marshal.cpp | |
parent | - Fixed errorDetection test (diff) | |
download | ice-cd75146bcf4be80cbd8b1a541e1e4dda4828a463.tar.bz2 ice-cd75146bcf4be80cbd8b1a541e1e4dda4828a463.tar.xz ice-cd75146bcf4be80cbd8b1a541e1e4dda4828a463.zip |
- bug 3566 - PHP redefinition errors
- suppressing Slice warnings in PHP slicing/objects test
Diffstat (limited to 'php/src/IcePHP/Marshal.cpp')
-rw-r--r-- | php/src/IcePHP/Marshal.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/php/src/IcePHP/Marshal.cpp b/php/src/IcePHP/Marshal.cpp index 1d3cce00542..fe802f345d1 100644 --- a/php/src/IcePHP/Marshal.cpp +++ b/php/src/IcePHP/Marshal.cpp @@ -2121,20 +2121,21 @@ IcePHP::ObjectMarshaler::marshal(zval* zv, const Ice::OutputStreamPtr& os, Objec Profile* profile = static_cast<Profile*>(ICE_G(profile)); assert(profile); zend_class_entry* cls = ce; - Profile::ClassMap::iterator p = profile->classes.find(cls->name); - while(p == profile->classes.end()) + const Profile::ClassMap& classes = profile->classes(); + Profile::ClassMap::const_iterator p = classes.find(cls->name); + while(p == classes.end()) { if(cls->parent) { - p = profile->classes.find(cls->parent->name); + p = classes.find(cls->parent->name); } - for(zend_uint i = 0; i < cls->num_interfaces && p == profile->classes.end(); ++i) + for(zend_uint i = 0; i < cls->num_interfaces && p == classes.end(); ++i) { - p = profile->classes.find(cls->interfaces[i]->name); + p = classes.find(cls->interfaces[i]->name); } cls = cls->parent; } - assert(p != profile->classes.end()); + assert(p != classes.end()); writer = new ObjectWriter(zv, p->second, m TSRMLS_CC); m.insert(pair<unsigned int, Ice::ObjectPtr>(Z_OBJ_HANDLE_P(zv), writer)); @@ -2196,9 +2197,10 @@ IcePHP::PHPObjectFactory::create(const string& scoped) // // We can only unmarshal an object if we have the definition of its Slice type. // - Profile::ClassMap::iterator p = profile->classes.find(flatten(scoped)); + const Profile::ClassMap& classes = profile->classes(); + Profile::ClassMap::const_iterator p = classes.find(flatten(scoped)); Slice::ClassDefPtr def; - if(p != profile->classes.end()) + if(p != classes.end()) { def = p->second; } |