[asterisk-scf-commits] asterisk-scf/release/ice.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Mar 31 06:39:05 CDT 2011
branch "master" has been updated
via 9e6ac154f85840502f15c61384d7d7dfa6e05ad3 (commit)
via 5d676a4a233f4dd8e088334d726fdee41650e8a0 (commit)
via 068d5366f5ca6779cb5b9ae037024f2da08bf21d (commit)
via cfd35498bdb1893155159520f62391420af1c020 (commit)
via 0a902683747b02c1579723ec78a6ad5e2d7901aa (commit)
via 55423a40ce533acd1e04744663754de219637ec6 (commit)
from 0860537db39fb7057e1b5bbeb5778ea448313afa (commit)
Summary of changes:
cpp/bin/.gitignore | 1 -
cpp/demo/Database/Oracle/occi/.depend | 1 +
cpp/demo/Database/Oracle/occi/.depend.mak | 1 +
cpp/demo/Database/Oracle/proc/.depend | 1 +
cpp/demo/Database/Oracle/proc/.depend.mak | 1 +
cpp/demo/Freeze/backup/.depend | 4 +-
cpp/demo/Freeze/backup/.depend.mak | 4 +-
cpp/demo/Freeze/bench/.depend | 6 +-
cpp/demo/Freeze/bench/.depend.mak | 6 +-
cpp/demo/Freeze/casino/.depend | 16 +-
cpp/demo/Freeze/casino/.depend.mak | 16 +-
cpp/demo/Freeze/customEvictor/.depend | 20 +-
cpp/demo/Freeze/customEvictor/.depend.mak | 20 +-
cpp/demo/Freeze/library/.depend | 36 +-
cpp/demo/Freeze/library/.depend.mak | 36 +-
cpp/demo/Freeze/phonebook/.depend | 36 +-
cpp/demo/Freeze/phonebook/.depend.mak | 36 +-
cpp/demo/Freeze/transform/.depend | 24 +-
cpp/demo/Freeze/transform/.depend.mak | 24 +-
cpp/demo/Glacier2/callback/.depend | 8 +-
cpp/demo/Glacier2/callback/.depend.mak | 8 +-
cpp/demo/Glacier2/chat/.depend | 8 +-
cpp/demo/Glacier2/chat/.depend.mak | 8 +-
cpp/demo/Ice/MFC/client/.depend | 1 +
cpp/demo/Ice/MFC/client/.depend.mak | 1 +
cpp/demo/Ice/MFC/server/.depend | 1 +
cpp/demo/Ice/MFC/server/.depend.mak | 1 +
cpp/demo/Ice/async/.depend | 10 +-
cpp/demo/Ice/async/.depend.mak | 10 +-
cpp/demo/Ice/bidir/.depend | 8 +-
cpp/demo/Ice/bidir/.depend.mak | 8 +-
cpp/demo/Ice/callback/.depend | 8 +-
cpp/demo/Ice/callback/.depend.mak | 8 +-
cpp/demo/Ice/converter/.depend | 10 +-
cpp/demo/Ice/converter/.depend.mak | 10 +-
cpp/demo/Ice/hello/.depend | 8 +-
cpp/demo/Ice/hello/.depend.mak | 8 +-
cpp/demo/Ice/hello/Client.cpp | 2 +
cpp/demo/Ice/hello/HelloI.cpp | 3 +-
cpp/demo/Ice/hello/config.client | 1 +
cpp/demo/Ice/hello/config.server | 1 +
cpp/demo/Ice/interleaved/.depend | 8 +-
cpp/demo/Ice/interleaved/.depend.mak | 8 +-
cpp/demo/Ice/invoke/.depend | 8 +-
cpp/demo/Ice/invoke/.depend.mak | 8 +-
cpp/demo/Ice/latency/.depend | 6 +-
cpp/demo/Ice/latency/.depend.mak | 6 +-
cpp/demo/Ice/minimal/.depend | 8 +-
cpp/demo/Ice/minimal/.depend.mak | 8 +-
cpp/demo/Ice/multicast/.depend | 8 +-
cpp/demo/Ice/multicast/.depend.mak | 8 +-
cpp/demo/Ice/nested/.depend | 8 +-
cpp/demo/Ice/nested/.depend.mak | 8 +-
cpp/demo/Ice/nrvo/.depend | 8 +-
cpp/demo/Ice/nrvo/.depend.mak | 8 +-
cpp/demo/Ice/plugin/.depend | 10 +-
cpp/demo/Ice/plugin/.depend.mak | 10 +-
cpp/demo/Ice/session/.depend | 12 +-
cpp/demo/Ice/session/.depend.mak | 12 +-
cpp/demo/Ice/throughput/.depend | 8 +-
cpp/demo/Ice/throughput/.depend.mak | 8 +-
cpp/demo/Ice/value/.depend | 10 +-
cpp/demo/Ice/value/.depend.mak | 10 +-
cpp/demo/IceBox/hello/.depend | 8 +-
cpp/demo/IceBox/hello/.depend.mak | 8 +-
cpp/demo/IceGrid/allocate/.depend | 8 +-
cpp/demo/IceGrid/allocate/.depend.mak | 8 +-
cpp/demo/IceGrid/icebox/.depend | 8 +-
cpp/demo/IceGrid/icebox/.depend.mak | 8 +-
cpp/demo/IceGrid/replication/.depend | 8 +-
cpp/demo/IceGrid/replication/.depend.mak | 8 +-
cpp/demo/IceGrid/secure/.depend | 8 +-
cpp/demo/IceGrid/secure/.depend.mak | 8 +-
cpp/demo/IceGrid/sessionActivation/.depend | 8 +-
cpp/demo/IceGrid/sessionActivation/.depend.mak | 8 +-
cpp/demo/IceGrid/simple/.depend | 8 +-
cpp/demo/IceGrid/simple/.depend.mak | 8 +-
cpp/demo/IcePatch2/MFC/.depend.mak | 1 +
cpp/demo/IceStorm/clock/.depend | 6 +-
cpp/demo/IceStorm/clock/.depend.mak | 6 +-
cpp/demo/IceStorm/counter/.depend | 10 +-
cpp/demo/IceStorm/counter/.depend.mak | 10 +-
cpp/demo/IceStorm/replicated/.depend | 6 +-
cpp/demo/IceStorm/replicated/.depend.mak | 6 +-
cpp/demo/IceStorm/replicated2/.depend | 6 +-
cpp/demo/IceStorm/replicated2/.depend.mak | 6 +-
cpp/demo/book/evictor_filesystem/.depend | 16 +-
cpp/demo/book/evictor_filesystem/.depend.mak | 16 +-
cpp/demo/book/lifecycle/.depend | 14 +-
cpp/demo/book/lifecycle/.depend.mak | 14 +-
cpp/demo/book/map_filesystem/.depend | 20 +-
cpp/demo/book/map_filesystem/.depend.mak | 20 +-
cpp/demo/book/printer/.depend | 6 +-
cpp/demo/book/printer/.depend.mak | 6 +-
cpp/demo/book/simple_filesystem/.depend | 8 +-
cpp/demo/book/simple_filesystem/.depend.mak | 8 +-
cpp/include/Ice/BasicStream.h | 9 +-
cpp/include/Ice/Exception.h | 1 +
cpp/include/Ice/Object.h | 4 +
cpp/include/Ice/SlicedData.h | 119 +
cpp/include/Ice/Stream.h | 12 +-
cpp/include/Slice/Parser.h | 24 +-
cpp/src/Freeze/.depend | 46 +-
cpp/src/Freeze/.depend.mak | 46 +-
cpp/src/FreezeScript/.depend | 26 +-
cpp/src/FreezeScript/.depend.mak | 26 +-
cpp/src/Glacier2/.depend | 26 +-
cpp/src/Glacier2/.depend.mak | 26 +-
cpp/src/Glacier2Lib/.depend | 10 +-
cpp/src/Glacier2Lib/.depend.mak | 10 +-
cpp/src/Ice/.depend | 167 +-
cpp/src/Ice/.depend.mak | 167 +-
cpp/src/Ice/BasicStream.cpp | 102 +-
cpp/src/Ice/Makefile | 7 +-
cpp/src/Ice/Makefile.mak | 7 +-
cpp/src/Ice/SlicedData.cpp | 436 ++++
cpp/src/Ice/StreamI.cpp | 49 +-
cpp/src/Ice/StreamI.h | 12 +-
cpp/src/IceBox/.depend | 10 +-
cpp/src/IceBox/.depend.mak | 10 +-
cpp/src/IceGrid/.depend | 104 +-
cpp/src/IceGrid/.depend.mak | 104 +-
cpp/src/IceGrid/FreezeDB/.depend | 8 +-
cpp/src/IceGrid/FreezeDB/.depend.mak | 8 +-
cpp/src/IceGrid/SqlDB/.depend | 5 +-
cpp/src/IceGrid/SqlDB/.depend.mak | 5 +-
cpp/src/IceGridLib/.depend | 20 +-
cpp/src/IceGridLib/.depend.mak | 20 +-
cpp/src/IcePatch2/.depend | 8 +-
cpp/src/IcePatch2/.depend.mak | 8 +-
cpp/src/IcePatch2Lib/.depend | 8 +-
cpp/src/IcePatch2Lib/.depend.mak | 8 +-
cpp/src/IceSSL/.depend | 24 +-
cpp/src/IceSSL/.depend.mak | 24 +-
cpp/src/IceStorm/.depend | 44 +-
cpp/src/IceStorm/.depend.mak | 44 +-
cpp/src/IceStorm/FreezeDB/.depend | 22 +-
cpp/src/IceStorm/FreezeDB/.depend.mak | 22 +-
cpp/src/IceStorm/SqlDB/.depend | 4 +-
cpp/src/IceStorm/SqlDB/.depend.mak | 4 +-
cpp/src/IceStormLib/.depend | 2 +-
cpp/src/IceStormLib/.depend.mak | 2 +-
cpp/src/Slice/.depend | 2 +-
cpp/src/Slice/.depend.mak | 2 +-
cpp/src/Slice/CPlusPlusUtil.cpp | 6 +-
cpp/src/Slice/CsUtil.cpp | 16 +-
cpp/src/Slice/Grammar.cpp | 2251 ++++++++++++--------
cpp/src/Slice/Grammar.h | 79 +-
cpp/src/Slice/Grammar.y | 51 +-
cpp/src/Slice/JavaUtil.cpp | 8 +-
cpp/src/Slice/Makefile | 9 +
cpp/src/Slice/Parser.cpp | 127 +-
cpp/src/Slice/PythonUtil.cpp | 4 +
cpp/src/Slice/RubyUtil.cpp | 2 +
cpp/src/Slice/Scanner.cpp | 1593 ++++++++------
cpp/src/Slice/Scanner.l | 1 +
cpp/src/iceserviceinstall/.depend.mak | 1 +
cpp/src/slice2cpp/Gen.cpp | 276 +--
cpp/src/slice2cs/Gen.cpp | 255 +--
cpp/src/slice2java/Gen.cpp | 208 +--
cpp/src/slice2php/Main.cpp | 8 +-
cpp/test/Freeze/complex/.depend | 12 +-
cpp/test/Freeze/complex/.depend.mak | 12 +-
cpp/test/Freeze/dbmap/.depend | 12 +-
cpp/test/Freeze/dbmap/.depend.mak | 12 +-
cpp/test/Freeze/evictor/.depend | 8 +-
cpp/test/Freeze/evictor/.depend.mak | 8 +-
cpp/test/Freeze/fileLock/.depend | 2 +-
cpp/test/Freeze/fileLock/.depend.mak | 2 +-
cpp/test/FreezeScript/dbmap/.depend | 6 +-
cpp/test/FreezeScript/dbmap/.depend.mak | 6 +-
cpp/test/FreezeScript/evictor/.depend | 4 +-
cpp/test/FreezeScript/evictor/.depend.mak | 4 +-
cpp/test/Glacier2/attack/.depend | 8 +-
cpp/test/Glacier2/attack/.depend.mak | 8 +-
cpp/test/Glacier2/dynamicFiltering/.depend | 14 +-
cpp/test/Glacier2/dynamicFiltering/.depend.mak | 14 +-
cpp/test/Glacier2/router/.depend | 8 +-
cpp/test/Glacier2/router/.depend.mak | 8 +-
cpp/test/Glacier2/sessionControl/.depend | 10 +-
cpp/test/Glacier2/sessionControl/.depend.mak | 10 +-
cpp/test/Glacier2/ssl/.depend | 4 +-
cpp/test/Glacier2/ssl/.depend.mak | 4 +-
cpp/test/Glacier2/staticFiltering/.depend | 8 +-
cpp/test/Glacier2/staticFiltering/.depend.mak | 8 +-
cpp/test/Ice/adapterDeactivation/.depend | 20 +-
cpp/test/Ice/adapterDeactivation/.depend.mak | 20 +-
cpp/test/Ice/ami/.depend | 10 +-
cpp/test/Ice/ami/.depend.mak | 10 +-
cpp/test/Ice/background/.depend | 30 +-
cpp/test/Ice/background/.depend.mak | 30 +-
cpp/test/Ice/binding/.depend | 10 +-
cpp/test/Ice/binding/.depend.mak | 10 +-
cpp/test/Ice/checksum/.depend | 8 +-
cpp/test/Ice/checksum/.depend.mak | 8 +-
cpp/test/Ice/checksum/server/.depend | 8 +-
cpp/test/Ice/checksum/server/.depend.mak | 8 +-
cpp/test/Ice/custom/.depend | 48 +-
cpp/test/Ice/custom/.depend.mak | 48 +-
cpp/test/Ice/defaultServant/.depend | 8 +-
cpp/test/Ice/defaultServant/.depend.mak | 8 +-
cpp/test/Ice/defaultValue/.depend | 6 +-
cpp/test/Ice/defaultValue/.depend.mak | 6 +-
cpp/test/Ice/dispatcher/.depend | 10 +-
cpp/test/Ice/dispatcher/.depend.mak | 10 +-
cpp/test/Ice/exceptions/.depend | 27 +-
cpp/test/Ice/exceptions/.depend.mak | 27 +-
cpp/test/Ice/facets/.depend | 16 +-
cpp/test/Ice/facets/.depend.mak | 16 +-
cpp/test/Ice/faultTolerance/.depend | 10 +-
cpp/test/Ice/faultTolerance/.depend.mak | 10 +-
cpp/test/Ice/gc/.depend | 4 +-
cpp/test/Ice/gc/.depend.mak | 4 +-
cpp/test/Ice/hold/.depend | 12 +-
cpp/test/Ice/hold/.depend.mak | 12 +-
cpp/test/Ice/info/.depend | 14 +-
cpp/test/Ice/info/.depend.mak | 14 +-
cpp/test/Ice/inheritance/.depend | 16 +-
cpp/test/Ice/inheritance/.depend.mak | 16 +-
cpp/test/Ice/interceptor/.depend | 12 +-
cpp/test/Ice/interceptor/.depend.mak | 12 +-
cpp/test/Ice/invoke/.depend | 12 +-
cpp/test/Ice/invoke/.depend.mak | 12 +-
cpp/test/Ice/location/.depend | 12 +-
cpp/test/Ice/location/.depend.mak | 12 +-
cpp/test/Ice/objects/.depend | 14 +-
cpp/test/Ice/objects/.depend.mak | 14 +-
cpp/test/Ice/operations/.depend | 54 +-
cpp/test/Ice/operations/.depend.mak | 54 +-
cpp/test/Ice/proxy/.depend | 26 +-
cpp/test/Ice/proxy/.depend.mak | 26 +-
cpp/test/Ice/retry/.depend | 12 +-
cpp/test/Ice/retry/.depend.mak | 12 +-
cpp/test/Ice/servantLocator/.depend | 32 +-
cpp/test/Ice/servantLocator/.depend.mak | 32 +-
cpp/test/Ice/slicing/exceptions/.depend | 24 +-
cpp/test/Ice/slicing/exceptions/.depend.mak | 24 +-
cpp/test/Ice/slicing/exceptions/AllTests.cpp | 6 +-
cpp/test/Ice/slicing/exceptions/ClientPrivate.ice | 6 +-
cpp/test/Ice/slicing/exceptions/Test.ice | 6 +-
cpp/test/Ice/slicing/exceptions/TestAMD.ice | 6 +-
cpp/test/Ice/slicing/objects/.depend | 30 +-
cpp/test/Ice/slicing/objects/.depend.mak | 30 +-
cpp/test/Ice/slicing/objects/ClientPrivate.ice | 10 +-
cpp/test/Ice/slicing/objects/Test.ice | 3 +-
cpp/test/Ice/slicing/objects/TestAMD.ice | 3 +-
cpp/test/Ice/stream/.depend | 4 +-
cpp/test/Ice/stream/.depend.mak | 4 +-
cpp/test/Ice/stringConverter/.depend | 4 +-
cpp/test/Ice/stringConverter/.depend.mak | 4 +-
cpp/test/Ice/threadPoolPriority/.depend | 12 +-
cpp/test/Ice/threadPoolPriority/.depend.mak | 12 +-
cpp/test/Ice/timeout/.depend | 12 +-
cpp/test/Ice/timeout/.depend.mak | 12 +-
cpp/test/Ice/udp/.depend | 10 +-
cpp/test/Ice/udp/.depend.mak | 10 +-
cpp/test/IceBox/configuration/.depend | 10 +-
cpp/test/IceBox/configuration/.depend.mak | 10 +-
cpp/test/IceGrid/activation/.depend | 10 +-
cpp/test/IceGrid/activation/.depend.mak | 10 +-
cpp/test/IceGrid/admin/.depend | 2 +-
cpp/test/IceGrid/admin/.depend.mak | 2 +-
cpp/test/IceGrid/allocation/.depend | 12 +-
cpp/test/IceGrid/allocation/.depend.mak | 12 +-
cpp/test/IceGrid/deployer/.depend | 14 +-
cpp/test/IceGrid/deployer/.depend.mak | 14 +-
cpp/test/IceGrid/distribution/.depend | 10 +-
cpp/test/IceGrid/distribution/.depend.mak | 10 +-
cpp/test/IceGrid/replicaGroup/.depend | 14 +-
cpp/test/IceGrid/replicaGroup/.depend.mak | 14 +-
cpp/test/IceGrid/replication/.depend | 10 +-
cpp/test/IceGrid/replication/.depend.mak | 10 +-
cpp/test/IceGrid/session/.depend | 8 +-
cpp/test/IceGrid/session/.depend.mak | 8 +-
cpp/test/IceGrid/simple/.depend | 10 +-
cpp/test/IceGrid/simple/.depend.mak | 10 +-
cpp/test/IceGrid/update/.depend | 10 +-
cpp/test/IceGrid/update/.depend.mak | 10 +-
cpp/test/IceSSL/configuration/.depend | 12 +-
cpp/test/IceSSL/configuration/.depend.mak | 12 +-
cpp/test/IceStorm/federation/.depend | 6 +-
cpp/test/IceStorm/federation/.depend.mak | 6 +-
cpp/test/IceStorm/federation2/.depend | 6 +-
cpp/test/IceStorm/federation2/.depend.mak | 6 +-
cpp/test/IceStorm/rep1/.depend | 8 +-
cpp/test/IceStorm/rep1/.depend.mak | 8 +-
cpp/test/IceStorm/repgrid/.depend | 4 +-
cpp/test/IceStorm/repgrid/.depend.mak | 4 +-
cpp/test/IceStorm/repstress/.depend | 12 +-
cpp/test/IceStorm/repstress/.depend.mak | 12 +-
cpp/test/IceStorm/single/.depend | 6 +-
cpp/test/IceStorm/single/.depend.mak | 6 +-
cpp/test/IceStorm/stress/.depend | 6 +-
cpp/test/IceStorm/stress/.depend.mak | 6 +-
.../Slice/errorDetection/DummyAtGlobalLevel.ice | 27 -
cpp/test/Slice/keyword/.depend | 4 +-
cpp/test/Slice/keyword/.depend.mak | 4 +-
cpp/test/Slice/parser/.depend | 4 +-
cpp/test/Slice/parser/.depend.mak | 4 +-
cpp/test/Slice/structure/.depend | 4 +-
cpp/test/Slice/structure/.depend.mak | 4 +-
cs/src/Ice/.depend | 1 +
cs/src/Ice/.depend.mak | 1 +
cs/src/Ice/BasicStream.cs | 105 +-
cs/src/Ice/Makefile | 5 +-
cs/src/Ice/Makefile.mak | 6 +-
cs/src/Ice/SlicedData.cs | 268 +++
cs/src/Ice/Stream.cs | 56 +-
cs/src/Ice/StreamI.cs | 44 +-
cs/test/Ice/slicing/exceptions/ClientPrivate.ice | 6 +-
cs/test/Ice/slicing/exceptions/Test.ice | 6 +-
cs/test/Ice/slicing/exceptions/TestAMD.ice | 6 +-
cs/test/Ice/slicing/objects/AllTests.cs | 3 +-
cs/test/Ice/slicing/objects/ClientPrivate.ice | 8 +-
cs/test/Ice/slicing/objects/Test.ice | 3 +-
cs/test/Ice/slicing/objects/TestAMD.ice | 3 +-
java/build.xml | 1 +
java/src/Ice/InputStream.java | 30 +
java/src/Ice/InputStreamI.java | 24 +
java/src/Ice/OutputStream.java | 26 +-
java/src/Ice/OutputStreamI.java | 22 +-
java/src/Ice/PreservedTransformer.java | 15 +
java/src/Ice/SlicedData.java | 223 ++
java/src/IceInternal/BasicStream.java | 96 +-
java/test/Ice/slicing/exceptions/ClientPrivate.ice | 12 +-
java/test/Ice/slicing/exceptions/ServerPrivate.ice | 6 +-
.../Ice/slicing/exceptions/ServerPrivateAMD.ice | 6 +-
java/test/Ice/slicing/objects/AllTests.java | 2 +
java/test/Ice/slicing/objects/ClientPrivate.ice | 11 +-
java/test/Ice/slicing/objects/ServerPrivate.ice | 3 +-
java/test/Ice/slicing/objects/ServerPrivateAMD.ice | 3 +-
php/lib/Ice.php | 4 +-
php/lib/Ice_ns.php | 4 +-
php/src/IcePHP/Operation.cpp | 2 +
php/src/IcePHP/Types.cpp | 214 ++-
php/src/IcePHP/Types.h | 9 +
php/test/Ice/slicing/objects/Client.php | 136 +-
php/test/Ice/slicing/objects/ClientPrivate.ice | 35 +
php/test/Ice/slicing/objects/Test.ice | 5 +
py/modules/IcePy/ObjectFactory.cpp | 2 +-
py/modules/IcePy/Operation.cpp | 30 +-
py/modules/IcePy/Types.cpp | 292 +++-
py/modules/IcePy/Types.h | 10 +
py/python/Ice.py | 7 +-
py/test/Ice/slicing/exceptions/AllTests.py | 116 +-
py/test/Ice/slicing/exceptions/ClientPrivate.ice | 40 +
py/test/Ice/slicing/exceptions/Server.py | 35 +
py/test/Ice/slicing/exceptions/ServerAMD.py | 43 +
py/test/Ice/slicing/exceptions/Test.ice | 25 +
py/test/Ice/slicing/exceptions/TestAMD.ice | 25 +
py/test/Ice/slicing/objects/AllTests.py | 280 +++-
py/test/Ice/slicing/objects/ClientPrivate.ice | 35 +
py/test/Ice/slicing/objects/Server.py | 5 +-
py/test/Ice/slicing/objects/ServerAMD.py | 2 +-
py/test/Ice/slicing/objects/Test.ice | 9 +-
py/test/Ice/slicing/objects/TestAMD.ice | 8 +-
rb/ruby/Ice.rb | 4 +-
rb/src/IceRuby/Communicator.cpp | 13 +-
rb/src/IceRuby/Operation.cpp | 4 +-
rb/src/IceRuby/Types.cpp | 183 ++-
rb/src/IceRuby/Types.h | 10 +
rb/test/Ice/slicing/objects/AllTests.rb | 196 ++
rb/test/Ice/slicing/objects/ClientPrivate.ice | 35 +
rb/test/Ice/slicing/objects/Test.ice | 5 +
vb/demo/Glacier2/callback/.depend.mak | 2 +-
vb/demo/Ice/async/.depend.mak | 2 +-
vb/demo/Ice/bidir/.depend.mak | 2 +-
vb/demo/Ice/callback/.depend.mak | 2 +-
vb/demo/Ice/hello/.depend.mak | 2 +-
vb/demo/Ice/invoke/.depend.mak | 2 +-
vb/demo/Ice/latency/.depend.mak | 2 +-
vb/demo/Ice/minimal/.depend.mak | 2 +-
vb/demo/Ice/nested/.depend.mak | 2 +-
vb/demo/Ice/session/.depend.mak | 2 +-
vb/demo/Ice/throughput/.depend.mak | 2 +-
vb/demo/Ice/value/.depend.mak | 2 +-
vb/demo/IceBox/hello/.depend.mak | 2 +-
vb/demo/IceGrid/simple/.depend.mak | 2 +-
vb/demo/IceStorm/clock/.depend.mak | 2 +-
vb/demo/book/printer/.depend.mak | 2 +-
vb/demo/book/simple_filesystem/.depend.mak | 2 +-
381 files changed, 7719 insertions(+), 4470 deletions(-)
delete mode 100644 cpp/bin/.gitignore
create mode 100644 cpp/include/Ice/SlicedData.h
create mode 100644 cpp/src/Ice/SlicedData.cpp
delete mode 100644 cpp/test/Slice/errorDetection/DummyAtGlobalLevel.ice
create mode 100644 cs/src/Ice/SlicedData.cs
create mode 100644 java/src/Ice/PreservedTransformer.java
create mode 100644 java/src/Ice/SlicedData.java
create mode 100644 py/test/Ice/slicing/exceptions/ClientPrivate.ice
- Log -----------------------------------------------------------------
commit 9e6ac154f85840502f15c61384d7d7dfa6e05ad3
Merge: 0860537 5d676a4
Author: Brent Eagles <beagles at digium.com>
Date: Wed Mar 30 22:54:15 2011 -0230
Merge branch 'object-slice-preservation'
diff --cc cpp/include/Slice/Parser.h
index 24cf113,016121a..9414c9d
--- a/cpp/include/Slice/Parser.h
+++ b/cpp/include/Slice/Parser.h
@@@ -706,9 -628,10 +708,11 @@@ public
bool isInterface() const;
bool isA(const std::string&) const;
virtual bool isLocal() const;
+ virtual bool isUnsliceable() const;
+ virtual bool isParentUnsliceable() const;
bool hasDataMembers() const;
bool hasOperations() const;
+ bool hasGeneratedOperations() const;
bool hasDefaultValues() const;
virtual ContainedType containedType() const;
virtual bool uses(const ContainedPtr&) const;
@@@ -724,9 -647,10 +728,11 @@@ protected
bool _interface;
bool _hasDataMembers;
bool _hasOperations;
+ bool _hasGeneratedOperations;
ClassList _bases;
bool _local;
+ bool _unsliceable;
+ bool _parentIsUnsliceable;
};
// ----------------------------------------------------------------------
diff --cc cpp/src/Slice/PythonUtil.cpp
index d9ece5e,489f0e1..e5853f8
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@@ -871,9 -794,11 +871,11 @@@ Slice::Python::CodeVisitor::visitClassD
}
DataMemberList members = p->dataMembers();
- _out << sp << nl << "_M_" << type << " = IcePy.defineClass('" << scoped << "', " << name << ", ";
+ _out << sp << nl << "_M_" << type << " = IcePy.defineClass('" << p->scoped(false) << "', " << name << ", ";
writeMetaData(p->getMetaData());
_out << ", " << (isAbstract ? "True" : "False") << ", ";
+ _out << (p->isUnsliceable() ? "True" : "False") << ", ";
+ _out << (p->isParentUnsliceable() ? "True" : "False") << ", ";
if(!base)
{
_out << "None";
diff --cc cpp/src/slice2cpp/Gen.cpp
index fbf9f32,b042c2f..dd5a09d
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@@ -4154,11 -4103,12 +4121,16 @@@ Slice::Gen::ObjectVisitor::visitClassDe
H << nl << "virtual ::std::vector< ::std::string> ice_ids"
<< "(const ::Ice::Current& = ::Ice::Current()) const;";
H << nl << "virtual const ::std::string& ice_id(const ::Ice::Current& = ::Ice::Current()) const;";
- H << nl << "static const ::std::string& ice_staticId();";
+ H << nl << "static const ::std::string& ice_staticId()";
+ H << sb;
+ H << nl << "static const ::std::string __ice_staticId = " << '"' << p->scoped() << '"' << ";";
+ H << nl << "return __ice_staticId;";
+ H << eb;
+ bool switchWrites = p->isUnsliceable() && !p->isParentUnsliceable();
+ if(switchWrites)
+ {
+ H << nl << "bool ice_isUnsliceable() const { return true; }";
+ }
if(!dataMembers.empty())
{
H << sp;
diff --cc cpp/src/slice2java/Gen.cpp
index 88073eb,682cbb8..e016437
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@@ -1384,22 -1227,10 +1352,9 @@@ Slice::JavaVisitor::writeDispatchAndMar
out << nl << "__is.endReadSlice();";
if(switchWrites)
{
- out << nl << "for(Ice.SkippedSlice i : __preserved)";
- out << sb;
- out << nl << "java.util.List<Ice.ObjectIdOffset> objs = __objectIdMap.get(i.typeId);";
- out << nl << "if(objs != null)";
-
+ out << nl << "if(__slicedData != null)";
out << sb;
- out << nl << "for(Ice.ObjectIdOffset offset : objs)";
- out << sb;
- out << nl << "Ice.ObjectPatcher mappedObj = __objectMap.get(offset.id);";
- out << nl << "if(mappedObj == null)";
- out << sb;
- out << nl << "Ice.ObjectPatcher patcher = new Ice.ObjectPatcher();";
- out << nl << "__objectMap.put(offset.id, patcher);";
- out << nl << "__is.addPreservedPatcher(patcher, offset.id);";
- out << eb;
- out << eb;
- out << eb;
+ out << nl << "__slicedData.__addPatchObjects(__is);";
out << eb;
}
out << nl << "super.__read(__is, true);";
diff --cc cpp/test/Ice/slicing/exceptions/Test.ice
index 4debac2,536d429..0bc5c2b
--- a/cpp/test/Ice/slicing/exceptions/Test.ice
+++ b/cpp/test/Ice/slicing/exceptions/Test.ice
@@@ -33,8 -33,8 +33,7 @@@ exception KnownMostDerived extends Know
string kmd;
};
- ["preserve"]
- exception BaseUnsliceable extends Base
-
+ unsliceable exception BaseUnsliceable extends Base
{
};
diff --cc cpp/test/Ice/slicing/objects/Test.ice
index 27f93e7,aa7f4da..a31dffc
--- a/cpp/test/Ice/slicing/objects/Test.ice
+++ b/cpp/test/Ice/slicing/objects/Test.ice
@@@ -29,8 -29,8 +29,7 @@@ class
B pb;
};
- ["preserve"]
- class BU extends B
-
+ unsliceable class BU extends B
{
};
diff --cc java/test/Ice/slicing/objects/ClientPrivate.ice
index dbd8535,a3fb1c9..22e9f16
--- a/java/test/Ice/slicing/objects/ClientPrivate.ice
+++ b/java/test/Ice/slicing/objects/ClientPrivate.ice
@@@ -32,8 -32,8 +32,7 @@@ class
B pb;
};
- ["preserve"]
- class BU extends B
-
+ unsliceable class BU extends B
{
};
diff --cc vb/demo/Glacier2/callback/.depend.mak
index 54e47dc,54e47dc..70e4952
--- a/vb/demo/Glacier2/callback/.depend.mak
+++ b/vb/demo/Glacier2/callback/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Callback.cs: ./Callback.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Callback.cs: ./Callback.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/async/.depend.mak
index 7a6a44a,7a6a44a..60c26e2
--- a/vb/demo/Ice/async/.depend.mak
+++ b/vb/demo/Ice/async/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/bidir/.depend.mak
index ea82f3e,ea82f3e..241065c
--- a/vb/demo/Ice/bidir/.depend.mak
+++ b/vb/demo/Ice/bidir/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Callback.cs: ./Callback.ice ..\..\..\..\slice/Ice/Identity.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Callback.cs: ./Callback.ice ..\..\..\..\slice/Ice/Identity.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/callback/.depend.mak
index 54e47dc,54e47dc..70e4952
--- a/vb/demo/Ice/callback/.depend.mak
+++ b/vb/demo/Ice/callback/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Callback.cs: ./Callback.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Callback.cs: ./Callback.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/hello/.depend.mak
index 7a6a44a,7a6a44a..60c26e2
--- a/vb/demo/Ice/hello/.depend.mak
+++ b/vb/demo/Ice/hello/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/invoke/.depend.mak
index e74a069,e74a069..b9cb7d9
--- a/vb/demo/Ice/invoke/.depend.mak
+++ b/vb/demo/Ice/invoke/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Printer.cs: ./Printer.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Printer.cs: ./Printer.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/latency/.depend.mak
index 1fffaca,1fffaca..43ff3bb
--- a/vb/demo/Ice/latency/.depend.mak
+++ b/vb/demo/Ice/latency/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Latency.cs: ./Latency.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Latency.cs: ./Latency.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/minimal/.depend.mak
index 7a6a44a,7a6a44a..60c26e2
--- a/vb/demo/Ice/minimal/.depend.mak
+++ b/vb/demo/Ice/minimal/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/nested/.depend.mak
index 0f57eab,0f57eab..d1d885b
--- a/vb/demo/Ice/nested/.depend.mak
+++ b/vb/demo/Ice/nested/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Nested.cs: ./Nested.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Nested.cs: ./Nested.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/session/.depend.mak
index 3801625,3801625..72e8cc5
--- a/vb/demo/Ice/session/.depend.mak
+++ b/vb/demo/Ice/session/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Session.cs: ./Session.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Session.cs: ./Session.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/throughput/.depend.mak
index 45ebb66,45ebb66..4398af7
--- a/vb/demo/Ice/throughput/.depend.mak
+++ b/vb/demo/Ice/throughput/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Throughput.cs: ./Throughput.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Throughput.cs: ./Throughput.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/Ice/value/.depend.mak
index 7e0c6f5,7e0c6f5..f7ff50f
--- a/vb/demo/Ice/value/.depend.mak
+++ b/vb/demo/Ice/value/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Value.cs: ./Value.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Value.cs: ./Value.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/IceBox/hello/.depend.mak
index 7a6a44a,7a6a44a..60c26e2
--- a/vb/demo/IceBox/hello/.depend.mak
+++ b/vb/demo/IceBox/hello/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/IceGrid/simple/.depend.mak
index 7a6a44a,7a6a44a..60c26e2
--- a/vb/demo/IceGrid/simple/.depend.mak
+++ b/vb/demo/IceGrid/simple/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Hello.cs: ./Hello.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/IceStorm/clock/.depend.mak
index a8f0e15,a8f0e15..c2d0011
--- a/vb/demo/IceStorm/clock/.depend.mak
+++ b/vb/demo/IceStorm/clock/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Clock.cs: ./Clock.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Clock.cs: ./Clock.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/book/printer/.depend.mak
index e74a069,e74a069..b9cb7d9
--- a/vb/demo/book/printer/.depend.mak
+++ b/vb/demo/book/printer/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Printer.cs: ./Printer.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Printer.cs: ./Printer.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
diff --cc vb/demo/book/simple_filesystem/.depend.mak
index 562f3dd,562f3dd..3433606
--- a/vb/demo/book/simple_filesystem/.depend.mak
+++ b/vb/demo/book/simple_filesystem/.depend.mak
@@@ -1,1 -1,1 +1,1 @@@
--generated/Filesystem.cs: ./Filesystem.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
++generated/Filesystem.cs: ./Filesystem.ice "$(SLICE2CS)" "$(SLICEPARSERLIB)"
commit 5d676a4a233f4dd8e088334d726fdee41650e8a0
Author: Brent Eagles <beagles at digium.com>
Date: Mon Dec 6 14:10:15 2010 -0330
Fixed several bugs in unsliceable exceptions in Python as well as fix missing tests.
Fixed a bug in SlicedData where hasNestedClasses was keying on the wrong data member.
diff --git a/cpp/src/Ice/SlicedData.cpp b/cpp/src/Ice/SlicedData.cpp
index 5240afd..dd7a3f7 100644
--- a/cpp/src/Ice/SlicedData.cpp
+++ b/cpp/src/Ice/SlicedData.cpp
@@ -141,7 +141,7 @@ Ice::SlicedDataImpl::updateObjectId(std::vector<Byte>& buffer, const Ice::Int of
bool
Ice::SlicedDataImpl::containsNestedClasses()
{
- return _objectIdMap.size() > 0;
+ return _objectMap.size() > 0;
}
void
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
index b282b51..95dd1a1 100644
--- a/py/modules/IcePy/Operation.cpp
+++ b/py/modules/IcePy/Operation.cpp
@@ -1447,6 +1447,24 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice:
return results.release();
}
+static bool
+hasClasses(PyObjectHandle obj)
+{
+ if(PyObject_HasAttrString(obj.get(), "__ice_slicedData__"))
+ {
+ PyObjectHandle slicedData = PyObject_GetAttrString(obj.get(), "__ice_slicedData__");
+ if(!PyCObject_Check(slicedData.get()))
+ {
+ PyErr_Format(PyExc_ValueError, STRCAST("sliced data not found (expected even if empty)"));
+ throw AbortMarshaling();
+ }
+ Ice::SlicedDataPtr* mem = reinterpret_cast<Ice::SlicedDataPtr*>(PyCObject_AsVoidPtr(slicedData.get()));
+ Ice::SlicedDataPtr slices = *mem;
+ return slices->containsNestedClasses();
+ }
+ return false;
+}
+
PyObject*
IcePy::TypedInvocation::unmarshalException(const pair<const Ice::Byte*, const Ice::Byte*>& bytes)
{
@@ -1472,6 +1490,10 @@ IcePy::TypedInvocation::unmarshalException(const pair<const Ice::Byte*, const Ic
{
is->readPendingObjects();
}
+ else if(info->isUnsliceable && hasClasses(ex))
+ {
+ is->readPendingObjects();
+ }
if(validateException(ex.get()))
{
@@ -3150,6 +3172,10 @@ IcePy::TypedUpcall::exception(PyException& ex)
{
os->writePendingObjects();
}
+ else if(info->isUnsliceable && hasClasses(ex.ex.get()))
+ {
+ os->writePendingObjects();
+ }
Ice::ByteSeq bytes;
os->finished(bytes);
diff --git a/py/modules/IcePy/Types.cpp b/py/modules/IcePy/Types.cpp
index 846605a..4f25cc8 100644
--- a/py/modules/IcePy/Types.cpp
+++ b/py/modules/IcePy/Types.cpp
@@ -2652,7 +2652,6 @@ IcePy::ObjectReader::read(const Ice::InputStreamPtr& is, bool rid)
PyObjectHandle slicedDataObj = PyCObject_FromVoidPtr(reinterpret_cast<void*>(sliceDataMem), deleteSlicedData);
if(!slicedDataObj.get())
{
- std::cerr<< __FUNCTION__ << ":" << __LINE__ << std::endl;
assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -2660,7 +2659,6 @@ IcePy::ObjectReader::read(const Ice::InputStreamPtr& is, bool rid)
int result = PyObject_SetAttrString(_object, "__ice_slicedData__", slicedDataObj.get());
if(result == -1)
{
- std::cerr<< __FUNCTION__ << ":" << __LINE__ << std::endl;
assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -2812,22 +2810,26 @@ IcePy::ExceptionInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Objec
ExceptionInfoPtr info = this;
Ice::ObjectIdMap idMap;
- if(info->isUnsliceable)
+
+ if(info->isUnsliceable && PyObject_HasAttrString(p, "__ice_slicedData__"))
{
PyObjectHandle slicedDataMem = PyObject_GetAttrString(p, "__ice_slicedData__");
- if(!slicedDataMem.get() || !PyCObject_Check(slicedDataMem.get()))
+ if(slicedDataMem.get())
{
- PyErr_Format(PyExc_ValueError, STRCAST("sliced data not found (expected even if empty)"));
- throw AbortMarshaling();
+ if(!PyCObject_Check(slicedDataMem.get()))
+ {
+ PyErr_Format(PyExc_ValueError, STRCAST("sliced data not found (expected even if empty)"));
+ throw AbortMarshaling();
+ }
+ Ice::SlicedDataPtr* mem = reinterpret_cast<Ice::SlicedDataPtr*>(PyCObject_AsVoidPtr(slicedDataMem.get()));
+ Ice::SlicedDataPtr slicedData = *mem;
+ //
+ // This writes all of the data that needs be written, and updates any object ids that are in the
+ // slices.
+ //
+ slicedData->transformPreserved(new SlicedObjectsTransform(objectMap));
+ slicedData->write(os, idMap, true);
}
- Ice::SlicedDataPtr* mem = reinterpret_cast<Ice::SlicedDataPtr*>(PyCObject_AsVoidPtr(slicedDataMem.get()));
- Ice::SlicedDataPtr slicedData = *mem;
- //
- // This writes all of the data that needs be written, and updates any object ids that are in the
- // slices.
- //
- slicedData->transformPreserved(new SlicedObjectsTransform(objectMap));
- slicedData->write(os, idMap, true);
}
while(info)
@@ -2915,6 +2917,7 @@ IcePy::ExceptionInfo::unmarshal(const Ice::InputStreamPtr& is)
//
ExceptionInfoPtr info = this;
Ice::SlicedDataPtr slicedData;
+ bool addPatchers = false;
if(info->isUnsliceable)
{
//
@@ -2922,25 +2925,28 @@ IcePy::ExceptionInfo::unmarshal(const Ice::InputStreamPtr& is)
// this is the proper time to get it from then input stream.
//
slicedData = is->getSlicedData();
- if(!slicedData)
- {
- slicedData = new Ice::SlicedData;
- }
- Ice::SlicedDataPtr* sliceDataMem = new Ice::SlicedDataPtr;
- *sliceDataMem = slicedData;
- PyObjectHandle slicedDataObj = PyCObject_FromVoidPtr(reinterpret_cast<void*>(sliceDataMem), deleteSlicedData);
- if(!slicedDataObj.get())
+ if(slicedData)
{
- assert(PyErr_Occurred());
- throw AbortMarshaling();
- }
+ Ice::SlicedDataPtr* sliceDataMem = new Ice::SlicedDataPtr;
+ *sliceDataMem = slicedData;
+ PyObjectHandle slicedDataObj = PyCObject_FromVoidPtr(reinterpret_cast<void*>(sliceDataMem), deleteSlicedData);
+ if(!slicedDataObj.get())
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
- int result = PyObject_SetAttrString(p.get(), "__ice_slicedData__", slicedDataObj.get());
- std::cerr << "setting sliced data" << std::endl;
- if(result == -1)
+ int result = PyObject_SetAttrString(p.get(), "__ice_slicedData__", slicedDataObj.get());
+ if(result == -1)
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
+ addPatchers = true;
+ }
+ else
{
- assert(PyErr_Occurred());
- throw AbortMarshaling();
+ slicedData = new Ice::SlicedData;
}
}
@@ -2952,6 +2958,14 @@ IcePy::ExceptionInfo::unmarshal(const Ice::InputStreamPtr& is)
DataMemberPtr member = *q;
member->type->unmarshal(is, member, p.get(), 0, &member->metaData);
}
+ if(info->isUnsliceable && !info->isParentUnsliceable && slicedData)
+ {
+ slicedData->readMap(is);
+ if(addPatchers)
+ {
+ slicedData->__addPatchObjects(is);
+ }
+ }
is->endSlice();
info = info->base;
diff --git a/py/test/Ice/slicing/exceptions/AllTests.py b/py/test/Ice/slicing/exceptions/AllTests.py
index f39cf54..825e085 100644
--- a/py/test/Ice/slicing/exceptions/AllTests.py
+++ b/py/test/Ice/slicing/exceptions/AllTests.py
@@ -10,7 +10,7 @@
import Ice, threading, sys
-Ice.loadSlice('Test.ice')
+Ice.loadSlice('--all -I. ClientPrivate.ice')
import Test
def test(b):
@@ -183,9 +183,41 @@ class Callback(CallbackBase):
test(False)
self.called()
+class ClientI(Test.ClientIntf):
+ def __init__(self):
+ pass
+
+ def baseAsBase(self, current=None):
+ b = Test.Base()
+ b.b = "Base"
+ raise b
+
+ def unknownDerivedAsBase(self, current=None):
+ ex = Test.ClientUnknownDerived()
+ ex.ud = "UnknownDerived"
+ ex.b = "Base"
+ raise ex
+
+ def unsliceableDerivedAsBase(self, current=None):
+ ex = Test.ClientUnsliceableDerived()
+ ex.ud = "UnsliceableDerived"
+ ex.b = "Base"
+ raise ex
+
+ def unsliceableWithInnerClass(self, current=None):
+ ex = Test.ClientUnsliceableWithClass()
+ ex.b = "WithInnerClass"
+ ex.myObj = Test.InnerClassDerived()
+ ex.myObj.ic = "InnerClass"
+ ex.myObj.id = "InnerClassDerived"
+ raise ex
+
def allTests(communicator):
obj = communicator.stringToProxy("Test:default -p 12010")
t = Test.TestIntfPrx.checkedCast(obj)
+ adapter = communicator.createObjectAdapterWithEndpoints("ClientAdapter", "default -p 12020 -t 2000")
+ client = Test.ClientIntfPrx.uncheckedCast(adapter.addWithUUID(ClientI()))
+ adapter.activate()
print "base... ",
try:
@@ -420,4 +452,86 @@ def allTests(communicator):
cb.check()
print "ok"
+ print "base pass through server... ",
+ try:
+ t.clientBaseAsBasePass(client)
+ test(False)
+ except Test.Base, b:
+ test(b.b == "Base")
+ test(b.ice_name() == "Test::Base")
+ except:
+ test(False)
+ print "ok"
+
+ print "base rethrown by server... ",
+ try:
+ t.clientBaseAsBaseRethrow(client)
+ test(False)
+ except Test.Base, b:
+ test(b.b == "Base")
+ test(b.ice_name() == "Test::Base")
+ except:
+ test(False)
+ print "ok"
+
+ print "unknown derived pass through server...",
+ try:
+ t.clientUnknownDerivedAsBasePass(client)
+ test(False)
+ except Test.Base, b:
+ test(b.b == "Base")
+ test(b.ice_name() == "Test::Base")
+ except:
+ test(False)
+ print "ok"
+
+ print "unknown derived pass rethrown by server...",
+ try:
+ t.clientUnknownDerivedAsBaseRethrow(client)
+ test(False)
+ except Test.Base, b:
+ test(b.b == "Base")
+ test(b.ice_name() == "Test::Base")
+ except:
+ test(False)
+ print "ok"
+
+ print "unsliceable derived pass through server...",
+ try:
+ t.clientUnsliceableDerivedAsBasePass(client)
+ test(False)
+ except Test.Base,b:
+ test(b.b == "Base")
+ test(b.ice_name() == "Test::ClientUnsliceableDerived")
+ except:
+ test(False)
+ print "ok"
+
+ print "Unsliceable derived rethrown by server...",
+ try:
+ t.clientUnsliceableDerivedAsBaseRethrow(client)
+ print "foo"
+ test(False)
+ except Test.Base,b:
+ test(b.b == "Base")
+ test(b.ice_name() == "Test::ClientUnsliceableDerived")
+ except Exception,e:
+ print e
+ test(False)
+ print "ok"
+
+ print "Unsliceable derived rethrown by server with inner class...",
+ try:
+ t.clientUnsliceableInnerClassRethrow(client)
+ test(False)
+ except Test.Base,b:
+ test(b.b == "WithInnerClass")
+ test(b.ice_name() == "Test::ClientUnsliceableWithClass")
+ test(b.myObj != None)
+ test(b.myObj.ic == "InnerClass")
+ test(b.myObj.id == "InnerClassDerived")
+ except Exception,e:
+ test(False)
+ print "ok"
+
return t
diff --git a/py/test/Ice/slicing/exceptions/ClientPrivate.ice b/py/test/Ice/slicing/exceptions/ClientPrivate.ice
new file mode 100644
index 0000000..1f25e10
--- /dev/null
+++ b/py/test/Ice/slicing/exceptions/ClientPrivate.ice
@@ -0,0 +1,40 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef CLIENTPRIVATE_ICE
+#define CLIENTPRIVATE_ICE
+
+#include <Test.ice>
+
+module Test
+{
+
+unsliceable class InnerClassDerived extends InnerClass
+{
+ string id;
+};
+
+exception ClientUnknownDerived extends Base
+{
+ string ud;
+};
+
+unsliceable exception ClientUnsliceableDerived extends BaseUnsliceable
+{
+ string ud;
+};
+
+unsliceable exception ClientUnsliceableWithClass extends BaseUnsliceable
+{
+ InnerClassDerived myObj;
+};
+
+};
+
+#endif
diff --git a/py/test/Ice/slicing/exceptions/Server.py b/py/test/Ice/slicing/exceptions/Server.py
index 00b1a1c..465b7ea 100755
--- a/py/test/Ice/slicing/exceptions/Server.py
+++ b/py/test/Ice/slicing/exceptions/Server.py
@@ -100,6 +100,41 @@ class TestI(Test.TestIntf):
umd2.umd2 = "UnknownMostDerived2.umd2"
raise umd2
+ def clientBaseAsBasePass(self, client, current=None):
+ client.baseAsBase()
+
+ def clientUnknownDerivedAsBasePass(self, client, current=None):
+ client.unknownDerivedAsBase()
+
+ def clientUnsliceableDerivedAsBasePass(self, client, current=None):
+ client.unsliceableDerivedAsBase()
+
+ def clientBaseAsBaseRethrow(self, client, current=None):
+ try:
+ client.baseAsBase()
+ except Test.Base, e:
+ raise
+
+ def clientUnknownDerivedAsBaseRethrow(self, client, current=None):
+ try:
+ client.unknownDerivedAsBase()
+ except Test.Base, e:
+ raise
+
+ def clientUnsliceableDerivedAsBaseRethrow(self, client, current=None):
+ try:
+ client.unsliceableDerivedAsBase()
+ except Test.Base, e:
+ print e
+ raise
+
+ def clientUnsliceableInnerClassRethrow(self, client, current=None):
+ try:
+ client.unsliceableWithInnerClass()
+ except Test.Base, e:
+ raise
+
+
def run(args, communicator):
properties = communicator.getProperties()
properties.setProperty("Ice.Warn.Dispatch", "0")
diff --git a/py/test/Ice/slicing/exceptions/ServerAMD.py b/py/test/Ice/slicing/exceptions/ServerAMD.py
index 1573b01..ac79db3 100755
--- a/py/test/Ice/slicing/exceptions/ServerAMD.py
+++ b/py/test/Ice/slicing/exceptions/ServerAMD.py
@@ -102,6 +102,49 @@ class TestI(Test.TestIntf):
umd2.umd2 = "UnknownMostDerived2.umd2"
cb.ice_exception(umd2)
+ def clientBaseAsBasePass_async(self, cb, client, current=None):
+ try:
+ client.baseAsBase()
+ except Test.Base, e:
+ cb.ice_exception(e)
+
+ def clientUnknownDerivedAsBasePass_async(self, cb, client, current=None):
+ try:
+ client.unknownDerivedAsBase()
+ except Test.Base, e:
+ cb.ice_exception(e)
+
+ def clientUnsliceableDerivedAsBasePass_async(self, cb, client, current=None):
+ try:
+ client.unsliceableDerivedAsBase()
+ except Test.Base, e:
+ cb.ice_exception(e)
+
+ def clientBaseAsBaseRethrow_async(self, cb, client, current=None):
+ try:
+ client.baseAsBase()
+ except Test.Base, e:
+ cb.ice_exception(e)
+
+ def clientUnknownDerivedAsBaseRethrow_async(self, cb, client, current=None):
+ try:
+ client.unknownDerivedAsBase()
+ except Test.Base, e:
+ cb.ice_exception(e)
+
+ def clientUnsliceableDerivedAsBaseRethrow_async(self, cb, client, current=None):
+ try:
+ client.unsliceableDerivedAsBase()
+ except Test.Base, e:
+ cb.ice_exception(e)
+
+ def clientUnsliceableInnerClassRethrow_async(self, cb, client, current=None):
+ try:
+ client.unsliceableWithInnerClass()
+ except Test.Base, e:
+ cb.ice_exception(e)
+
+
def run(args, communicator):
properties = communicator.getProperties()
properties.setProperty("Ice.Warn.Dispatch", "0")
diff --git a/py/test/Ice/slicing/exceptions/Test.ice b/py/test/Ice/slicing/exceptions/Test.ice
index 9248cdc..e91e67f 100644
--- a/py/test/Ice/slicing/exceptions/Test.ice
+++ b/py/test/Ice/slicing/exceptions/Test.ice
@@ -33,6 +33,23 @@ exception KnownMostDerived extends KnownIntermediate
string kmd;
};
+unsliceable exception BaseUnsliceable extends Base
+{
+};
+
+unsliceable class InnerClass
+{
+ string ic;
+};
+
+interface ClientIntf
+{
+ void baseAsBase() throws Base;
+ void unknownDerivedAsBase() throws Base;
+ void unsliceableDerivedAsBase() throws Base;
+ void unsliceableWithInnerClass() throws Base;
+};
+
interface TestIntf
{
void baseAsBase() throws Base;
@@ -51,6 +68,14 @@ interface TestIntf
void unknownMostDerived1AsKnownIntermediate() throws KnownIntermediate;
void unknownMostDerived2AsBase() throws Base;
+ void clientBaseAsBasePass(ClientIntf* client) throws Base;
+ void clientUnknownDerivedAsBasePass(ClientIntf* client) throws Base;
+ void clientUnsliceableDerivedAsBasePass(ClientIntf* client) throws Base;
+ void clientBaseAsBaseRethrow(ClientIntf* client) throws Base;
+ void clientUnknownDerivedAsBaseRethrow(ClientIntf* client) throws Base;
+ void clientUnsliceableDerivedAsBaseRethrow(ClientIntf* client) throws Base;
+ void clientUnsliceableInnerClassRethrow(ClientIntf* client) throws Base;
+
void shutdown();
};
diff --git a/py/test/Ice/slicing/exceptions/TestAMD.ice b/py/test/Ice/slicing/exceptions/TestAMD.ice
index 3de14d1..c95c16d 100644
--- a/py/test/Ice/slicing/exceptions/TestAMD.ice
+++ b/py/test/Ice/slicing/exceptions/TestAMD.ice
@@ -33,6 +33,23 @@ exception KnownMostDerived extends KnownIntermediate
string kmd;
};
+unsliceable exception BaseUnsliceable extends Base
+{
+};
+
+unsliceable class InnerClass
+{
+ string ic;
+};
+
+interface ClientIntf
+{
+ void baseAsBase() throws Base;
+ void unknownDerivedAsBase() throws Base;
+ void unsliceableDerivedAsBase() throws Base;
+ void unsliceableWithInnerClass() throws Base;
+};
+
["amd"] interface TestIntf
{
void baseAsBase() throws Base;
@@ -51,6 +68,14 @@ exception KnownMostDerived extends KnownIntermediate
void unknownMostDerived1AsKnownIntermediate() throws KnownIntermediate;
void unknownMostDerived2AsBase() throws Base;
+ void clientBaseAsBasePass(ClientIntf* client) throws Base;
+ void clientUnknownDerivedAsBasePass(ClientIntf* client) throws Base;
+ void clientUnsliceableDerivedAsBasePass(ClientIntf* client) throws Base;
+ void clientBaseAsBaseRethrow(ClientIntf* client) throws Base;
+ void clientUnknownDerivedAsBaseRethrow(ClientIntf* client) throws Base;
+ void clientUnsliceableDerivedAsBaseRethrow(ClientIntf* client) throws Base;
+ void clientUnsliceableInnerClassRethrow(ClientIntf* client) throws Base;
+
void shutdown();
};
commit 068d5366f5ca6779cb5b9ae037024f2da08bf21d
Author: Brent Eagles <beagles at digium.com>
Date: Fri Dec 3 16:25:02 2010 -0330
- Add some missing tests.
- Fixed a bug where null references would cause a crash
- Fixed an issue in Ruby where the absence of the hidden iceSlicedData would
cause a crash.
diff --git a/php/src/IcePHP/Types.cpp b/php/src/IcePHP/Types.cpp
index a6fb8a3..edb3d47 100644
--- a/php/src/IcePHP/Types.cpp
+++ b/php/src/IcePHP/Types.cpp
@@ -2221,7 +2221,8 @@ IcePHP::ObjectWriter::write(const Ice::OutputStreamPtr& os) const
idOffset.offset = os->getWriteSliceOffset();
member->type->marshal(*val, os, _map TSRMLS_CC);
- if(info->isUnsliceable)
+
+ if(info->isUnsliceable && Z_TYPE_P(*val) != IS_NULL)
{
ClassInfoPtr memberInfo = ClassInfoPtr::dynamicCast(member->type);
if(memberInfo != 0)
diff --git a/php/test/Ice/slicing/objects/Client.php b/php/test/Ice/slicing/objects/Client.php
index 2da3430..ec1a6bd 100644
--- a/php/test/Ice/slicing/objects/Client.php
+++ b/php/test/Ice/slicing/objects/Client.php
@@ -27,6 +27,7 @@ function allTests($communicator)
$d1cls = $NS ? "Test\\D1" : "Test_D1";
$d3cls = $NS ? "Test\\D3" : "Test_D3";
+ $d5cls = $NS ? "Test\\D5" : "Test_D5";
$obj = $communicator->stringToProxy("Test:default -p 12010");
$test = $obj->ice_checkedCast("::Test::TestIntf");
@@ -380,54 +381,99 @@ function allTests($communicator)
}
echo "ok\n";
- echo "testing return value identity for input params unknown first... ";
+ echo "testing return value unsliced input params known first... ";
flush();
{
$d1 = $NS ? eval("return new Test\\D1;") : eval("return new Test_D1;");
$d1->sb = "D1.sb";
$d1->sd1 = "D1.sd1";
- $d3 = $NS ? eval("return new Test\\D3;") : eval("return new Test_D3;");
- $d3->pb = $d1;
- $d3->sb = "D3.sb";
- $d3->sd3 = "D3.sd3";
- $d3->pd3 = $d1;
- $d1->pb = $d3;
- $d1->pd1 = $d3;
+ $d5 = $NS ? eval("return new Test\\D5;") : eval("return new Test_D5;");
+ $d5->pb = $d1;
+ $d5->sb = "D5.sb";
+ $d5->sd5 = "D5.sd5";
+ $d5->pd5 = $d1;
+ $d1->pb = $d5;
+ $d1->pd1 = $d5;
- $b1 = $test->returnTest3($d3, $d1);
+ $b1 = $test->returnTest3($d1, $d5);
test($b1 != null);
- test($b1->sb == "D3.sb");
- test(get_class($b1) == ($NS ? "Test\\B" : "Test_B")); // Sliced by server
- test(!($b1 instanceof $d3cls));
+ test($b1->sb == "D1.sb");
+ test(get_class($b1) == ($NS ? "Test\\D1" : "Test_D1"));
+ $p1 = $b1;
+ test($p1 != null);
+ test($p1->sd1 == "D1.sd1");
+ test($p1->pd1 === $b1->pb); // Object identity comparison
$b2 = $b1->pb;
test($b2 != null);
- test($b2->sb == "D1.sb");
- test(get_class($b2) == ($NS ? "Test\\D1" : "Test_D1"));
+ test($b2->sb == "D5.sb");
+ test(get_class($b2) != ($NS ? "Test\\B" : "Test_B")); // Sliced by server
+ test(get_class($b2) == ($NS ? "Test\\D5" : "Test_D5")); // Sliced by server
test($b2->pb === $b1); // Object identity comparison
- $p3 = $b2;
- test($p3 instanceof $d1cls);
- test($p3->sd1 == "D1.sd1");
- test($p3->pd1 === $b1); // Object identity comparison
+ test(($b2 instanceof $d5cls));
test($b1 !== $d1);
- test($b1 !== $d3);
+ test($b1 !== $d5);
test($b2 !== $d1);
- test($b2 !== $d3);
+ test($b2 !== $d5);
//
// Break cyclic dependencies - helps in detecting leaks.
//
- $d3->pb = null;
- $d3->pd3 = null;
- $d3->pb = null;
- $d3->pd3 = null;
+ $d1->pb = null;
+ $d1->pd1 = null;
$b1->pb = null;
- $b2->pb = null;
+ $p1->pd1 = null;
}
echo "ok\n";
+ echo "testing return value unsliced input params unknown first... ";
+ flush();
+ {
+ $d1 = $NS ? eval("return new Test\\D1;") : eval("return new Test_D1;");
+ $d1->sb = "D1.sb";
+ $d1->sd1 = "D1.sd1";
+ $d5 = $NS ? eval("return new Test\\D5;") : eval("return new Test_D5;");
+ $d5->pb = $d1;
+ $d5->sb = "D5.sb";
+ $d5->sd5 = "D5.sd5";
+ $d5->pd5 = $d1;
+ $d1->pb = $d5;
+ $d1->pd1 = $d5;
+
+ $b2 = $test->returnTest3($d5, $d1);
+
+ test($b2 != null);
+ test($b2->sb == "D5.sb");
+ test(get_class($b2) != ($NS ? "Test\\B" : "Test_B")); // Sliced by server
+ test(get_class($b2) == ($NS ? "Test\\D5" : "Test_D5")); // Sliced by server
+ test(($b2 instanceof $d5cls));
+
+ $b1 = $b2->pb;
+ test($b1 != null);
+ test($b1->sb == "D1.sb");
+ test(get_class($b1) == ($NS ? "Test\\D1" : "Test_D1"));
+ $p1 = $b1;
+ test($p1 != null);
+ test($p1->sd1 == "D1.sd1");
+ test($p1->pd1 === $b1->pb); // Object identity comparison
+
+ test($b1 !== $d1);
+ test($b1 !== $d5);
+ test($b2 !== $d1);
+ test($b2 !== $d5);
+
+ //
+ // Break cyclic dependencies - helps in detecting leaks.
+ //
+ $d1->pb = null;
+ $d1->pd1 = null;
+ $b1->pb = null;
+ $p1->pd1 = null;
+ }
+ echo "ok\n";
+
echo "testing remainder unmarshaling (3 instances)... ";
flush();
{
@@ -467,6 +513,46 @@ function allTests($communicator)
}
echo "ok\n";
+ echo "object graphs of unsliceable objects...";
+ flush();
+ {
+ $graphBase = $NS ? eval("return new Test\\GraphBase;") : eval("return new Test_GraphBase;");
+ $d6 = $NS ? eval("return new Test\\D6;") : eval("return new Test_D6;");
+ $d6->sd6 = "d6.1";
+ $d6->innerD5 = $NS ? eval("return new Test\\D5;") : eval("return new Test_D5;");
+ $d6->innerD5->sd5 = "d6.1.d5";
+ $d6->innerD5->pd5 = $NS ? eval("return new Test\\B;") : eval("return new Test_B;");
+ $d6->innerD5->pd5->sb = "d6.1.d5.sb";
+ $d6->innerD5->pd5->pb = $NS ? eval("return new Test\\B") : eval("return new Test_B;");
+ $d6->innerD5->pd5->pb->sb = "d6.1.d5.sb.sb";
+ $graphBase->left = $d6;
+
+ $d7 = $NS ? eval("return new Test\\D7;") : eval("return new Test_D7;");
+ $d7->sd7 = "d7";
+ $d7->innerD7 = $NS ? eval("return new Test\\D7;") : eval("return new Test_D7;");
+ $d7->innerD7->sd7 = "d7.d7";
+ $d7->innerD7->innerD7 = $NS ? eval("return new Test\\D7;") : eval("return new Test_D7;");
+ $d7->innerD7->innerD7->sd7 = "d7.d7.d7";
+ $graphBase->right = $d7;
+
+ $result = $test->returnTest3($graphBase, $d7);
+ test($result != null);
+ test($result->left->sd6 == "d6.1");
+ test($result->left->innerD5 != null);
+ test($result->left->innerD5->sd5 == "d6.1.d5");
+ test($result->left->innerD5->pd5 != null);
+ test($result->left->innerD5->pd5->sb == "d6.1.d5.sb");
+ test($result->left->innerD5->pd5->pb != null);
+ test($result->left->innerD5->pd5->pb->sb == "d6.1.d5.sb.sb");
+
+ test($result->right->sd7 == "d7");
+ test($result->right->innerD7 != null);
+ test($result->right->innerD7->sd7 == "d7.d7");
+ test($result->right->innerD7->innerD7 != null);
+ test($result->right->innerD7->innerD7->sd7 == "d7.d7.d7");
+ }
+ echo "ok\n";
+
echo "testing parameter pointer slicing with first instance marshaled in unknown derived as base... ";
flush();
{
diff --git a/php/test/Ice/slicing/objects/ClientPrivate.ice b/php/test/Ice/slicing/objects/ClientPrivate.ice
index 25a4b74..738e653 100644
--- a/php/test/Ice/slicing/objects/ClientPrivate.ice
+++ b/php/test/Ice/slicing/objects/ClientPrivate.ice
@@ -21,6 +21,41 @@ class D3 extends B
B pd3;
};
+unsliceable class D5 extends BU
+{
+ string sd5;
+ B pd5;
+};
+
+unsliceable class GraphBase extends BU
+{
+ BU left;
+ BU right;
+};
+
+unsliceable class D6 extends BU
+{
+ string sd6;
+ D5 innerD5;
+};
+
+unsliceable class D7 extends BU
+{
+ string sd7;
+ D7 innerD7;
+};
+
+class UnknownInner
+{
+ string ic;
+};
+
+unsliceable class D8 extends BU
+{
+ string sd8;
+ UnknownInner innerObj;
+};
+
};
#endif
diff --git a/php/test/Ice/slicing/objects/Test.ice b/php/test/Ice/slicing/objects/Test.ice
index caaf53f..1c8dbea 100644
--- a/php/test/Ice/slicing/objects/Test.ice
+++ b/php/test/Ice/slicing/objects/Test.ice
@@ -29,6 +29,10 @@ class B
B pb;
};
+unsliceable class BU extends B
+{
+};
+
class D1 extends B
{
string sd1;
@@ -95,6 +99,7 @@ class Forward; // Forward-declared class defined in another compilation
B returnTest2(out B p2, out B p1);
B returnTest3(B p1, B p2);
+ BSeq echoSeq(BSeq p1, out BSeq p2);
SS sequenceTest(SS1 p1, SS2 p2);
BDict dictionaryTest(BDict bin, out BDict bout);
diff --git a/py/modules/IcePy/Types.cpp b/py/modules/IcePy/Types.cpp
index f596948..846605a 100644
--- a/py/modules/IcePy/Types.cpp
+++ b/py/modules/IcePy/Types.cpp
@@ -2535,7 +2535,7 @@ IcePy::ObjectWriter::write(const Ice::OutputStreamPtr& os) const
idOffset.offset = os->getWriteSliceOffset();
member->type->marshal(val.get(), os, _map, &member->metaData);
- if(info->isUnsliceable)
+ if(info->isUnsliceable && val.get() != Py_None)
{
//
// To update the object id map, we need to:
@@ -2862,7 +2862,7 @@ IcePy::ExceptionInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Objec
Ice::ObjectIdOffset idOffset;
idOffset.offset = os->getWriteSliceOffset();
member->type->marshal(val.get(), os, objectMap, &member->metaData);
- if(info->isUnsliceable)
+ if(info->isUnsliceable && val.get() != Py_None)
{
//
// To update the object id map, we need to:
diff --git a/py/test/Ice/slicing/objects/AllTests.py b/py/test/Ice/slicing/objects/AllTests.py
index 44d1701..3a40bb2 100644
--- a/py/test/Ice/slicing/objects/AllTests.py
+++ b/py/test/Ice/slicing/objects/AllTests.py
@@ -736,6 +736,7 @@ def allTests(communicator):
test(False)
print "ok"
+
print "return value unsliced for input params known first...",
try:
d1 = Test.D1()
@@ -749,6 +750,43 @@ def allTests(communicator):
d1.pb = d5
d1.pd1 = d5
+ b1 = t.returnTest3(d1, d5)
+
+ test(b1)
+ test(b1.sb == "D1.sb")
+ test(b1.ice_id() == "::Test::D1")
+ p3 = b1
+ test(isinstance(p3, Test.D1))
+ test(p3.sd1 == "D1.sd1")
+
+ b2 = b1.pb
+ test(b2)
+ test(b2.sb == "D5.sb")
+ test(b2.ice_id() == "::Test::D5") # Not sliced by server
+ p1 = b2
+ test(isinstance(p1, Test.D5))
+
+ test(b1 != d1)
+ test(b1 != d3)
+ test(b2 != d1)
+ test(b2 != d3)
+ except Ice.Exception, e:
+ test(False)
+ print "ok"
+
+ print "return value unsliced for input params known first (AMI)...",
+ try:
+ d1 = Test.D1()
+ d1.sb = "D1.sb"
+ d1.sd1 = "D1.sd1"
+ d5 = Test.D5()
+ d5.pb = d1
+ d5.sb = "D5.sb"
+ d5.sd5 = "D5.sd5"
+ d5.pd5 = d1
+ d1.pb = d5
+ d1.pd1 = d5
+
cb = Callback()
t.begin_returnTest3(d1, d5, cb.response_returnTest3, cb.exception)
cb.check()
@@ -789,6 +827,45 @@ def allTests(communicator):
d1.pb = d5
d1.pd1 = d5
+ b1 = t.returnTest3(d5, d1)
+
+ test(b1)
+ test(b1.sb == "D5.sb")
+ test(b1.ice_id() == "::Test::D5") # Not sliced by server
+ p1 = b1
+ test(isinstance(p1, Test.D5))
+
+ b2 = b1.pb
+ test(b2)
+ test(b2.sb == "D1.sb")
+ test(b2.ice_id() == "::Test::D1")
+ test(b2.pb == b1)
+ p3 = b2
+ test(isinstance(p3, Test.D1))
+ test(p3.sd1 == "D1.sd1")
+ test(p3.pd1 == b1)
+
+ test(b1 != d1)
+ test(b1 != d3)
+ test(b2 != d1)
+ test(b2 != d3)
+ except Ice.Exception, e:
+ test(False)
+ print "ok"
+
+ print "return value unsliced for input params unknown first (AMI)...",
+ try:
+ d1 = Test.D1()
+ d1.sb = "D1.sb"
+ d1.sd1 = "D1.sd1"
+ d5 = Test.D5()
+ d5.pb = d1
+ d5.sb = "D5.sb"
+ d5.sd5 = "D5.sd5"
+ d5.pd5 = d1
+ d1.pb = d5
+ d1.pd1 = d5
+
cb = Callback()
t.begin_returnTest3(d5, d1, cb.response_returnTest3, cb.exception)
cb.check()
@@ -869,6 +946,49 @@ def allTests(communicator):
cb.check()
print "ok"
+ print "object graphs of unsliceable objects...",
+ try:
+ graphBase = Test.GraphBase()
+ d6 = Test.D6()
+ d6.sd6 = "d6.1"
+ d6.innerD5 = Test.D5()
+ d6.innerD5.sd5 = "d6.1.d5"
+ d6.innerD5.pd5 = Test.B()
+ d6.innerD5.pd5.sb = "d6.1.d5.sb"
+ d6.innerD5.pd5.pb = Test.B()
+ d6.innerD5.pd5.pb.sb = "d6.1.d5.sb.sb"
+ graphBase.left = d6
+
+ d7 = Test.D7()
+ d7.sd7 = "d7"
+ d7.innerD7 = Test.D7()
+ d7.innerD7.sd7 = "d7.d7"
+ d7.innerD7.innerD7 = Test.D7()
+ d7.innerD7.innerD7.sd7 = "d7.d7.d7"
+ graphBase.right = d7
+
+ result = t.returnTest3(graphBase, d7)
+ test(result != None)
+ test(result.left.sd6 == "d6.1")
+ test(result.left.innerD5 != None)
+ test(result.left.innerD5.sd5 == "d6.1.d5")
+ test(result.left.innerD5.pd5 != None)
+ test(result.left.innerD5.pd5.sb == "d6.1.d5.sb")
+ test(result.left.innerD5.pd5.pb != None)
+ test(result.left.innerD5.pd5.pb.sb == "d6.1.d5.sb.sb")
+
+ test(result.right.sd7 == "d7")
+ test(result.right.innerD7 != None)
+ test(result.right.innerD7.sd7 == "d7.d7")
+ test(result.right.innerD7.innerD7 != None)
+ test(result.right.innerD7.innerD7.sd7 == "d7.d7.d7")
+
+ except Ice.Exception,e:
+ print e
+ test(False)
+
+ print "ok"
+
print "param ptr slicing, instance marshaled in unknown derived as base... ",
try:
b1 = Test.B()
@@ -1115,21 +1235,14 @@ def allTests(communicator):
test(ss.c2)
ss2b = ss.c2.s[0]
ss2d1 = ss.c2.s[1]
- ss2d3 = ss.c2.s[2]
+ ss2d5 = ss.c2.s[2]
test(ss1b.pb == ss1b)
test(ss1d1.pb == ss1b)
-
test(ss2b.pb == ss1b)
test(ss2d1.pb == ss2b)
- #
- # Unsliceable objects are transformed internally
- # when they are sent across the wire, resulting
- # in different __hash__ values. A straight
- # object comparison will fail.
- #
- test(str(ss2d5.pb) == str(ss2b))
+ test(ss2d5.pb == ss2b)
test(ss1b.ice_id() == "::Test::B")
test(ss1d1.ice_id() == "::Test::D1")
diff --git a/py/test/Ice/slicing/objects/Server.py b/py/test/Ice/slicing/objects/Server.py
index b6eab65..c3cb31b 100755
--- a/py/test/Ice/slicing/objects/Server.py
+++ b/py/test/Ice/slicing/objects/Server.py
@@ -172,6 +172,9 @@ class TestI(Test.TestIntf):
def returnTest3(self, p1, p2, current=None):
return p1
+ def echoSeq(self, p1, current=None):
+ return (p1, p1)
+
def sequenceTest(self, p1, p2, current=None):
ss = Test.SS3()
ss.c1 = p1
diff --git a/py/test/Ice/slicing/objects/Test.ice b/py/test/Ice/slicing/objects/Test.ice
index 4bf2ea8..07d6bb2 100644
--- a/py/test/Ice/slicing/objects/Test.ice
+++ b/py/test/Ice/slicing/objects/Test.ice
@@ -99,6 +99,7 @@ interface TestIntf
B returnTest2(out B p2, out B p1);
B returnTest3(B p1, B p2);
+ BSeq echoSeq(BSeq s1, out BSeq s2);
SS3 sequenceTest(SS1 p1, SS2 p2);
BDict dictionaryTest(BDict bin, out BDict bout);
diff --git a/rb/src/IceRuby/Types.cpp b/rb/src/IceRuby/Types.cpp
index 49be59b..203ff1b 100644
--- a/rb/src/IceRuby/Types.cpp
+++ b/rb/src/IceRuby/Types.cpp
@@ -1661,14 +1661,17 @@ IceRuby::ObjectWriter::write(const Ice::OutputStreamPtr& os) const
Ice::ObjectIdMap idMap;
if(info->isUnsliceable)
{
- VALUE obj = callRuby(rb_iv_get, _object, "@iceSlicedData");
- if(obj)
+ if(callRuby(rb_ivar_defined, _object, rb_intern("@iceSlicedData")) != Qfalse)
{
- Ice::SlicedDataPtr* m = 0;
- Data_Get_Struct(obj, Ice::SlicedDataPtr, m);
- Ice::SlicedDataPtr slicedData = *m;
- slicedData->transformPreserved(new SlicedObjectsTransform(_map));
- slicedData->write(os, idMap, false);
+ VALUE obj = callRuby(rb_iv_get, _object, "@iceSlicedData");
+ if(obj)
+ {
+ Ice::SlicedDataPtr* m = 0;
+ Data_Get_Struct(obj, Ice::SlicedDataPtr, m);
+ Ice::SlicedDataPtr slicedData = *m;
+ slicedData->transformPreserved(new SlicedObjectsTransform(_map));
+ slicedData->write(os, idMap, false);
+ }
}
}
while(info)
@@ -1690,7 +1693,7 @@ IceRuby::ObjectWriter::write(const Ice::OutputStreamPtr& os) const
Ice::ObjectIdOffset idOffset;
idOffset.offset = os->getWriteSliceOffset();
member->type->marshal(val, os, _map);
- if(info->isUnsliceable)
+ if(info->isUnsliceable && !NIL_P(val))
{
ClassInfoPtr memberInfo = ClassInfoPtr::dynamicCast(member->type);
if(memberInfo != 0)
@@ -1920,12 +1923,15 @@ IceRuby::ExceptionInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectM
Ice::ObjectIdMap idMap;
if(info->isUnsliceable)
{
- VALUE obj = callRuby(rb_iv_get, p, "@iceSlicedData");
- Ice::SlicedDataPtr* m = 0;
- Data_Get_Struct(obj, Ice::SlicedDataPtr, m);
- assert(m);
- Ice::SlicedDataPtr slicedData = *m;
- slicedData->write(os, idMap, false);
+ if(callRuby(rb_ivar_defined, p, rb_intern("@iceSlicedData")) != Qfalse)
+ {
+ VALUE obj = callRuby(rb_iv_get, p, "@iceSlicedData");
+ Ice::SlicedDataPtr* m = 0;
+ Data_Get_Struct(obj, Ice::SlicedDataPtr, m);
+ assert(m);
+ Ice::SlicedDataPtr slicedData = *m;
+ slicedData->write(os, idMap, false);
+ }
}
os->write(usesClasses);
@@ -1949,7 +1955,7 @@ IceRuby::ExceptionInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectM
Ice::ObjectIdOffset idOffset;
idOffset.offset = os->getWriteSliceOffset();
member->type->marshal(val, os, objectMap);
- if(info->isUnsliceable)
+ if(info->isUnsliceable && !NIL_P(val))
{
ClassInfoPtr memberInfo = ClassInfoPtr::dynamicCast(member->type);
if(memberInfo != 0)
diff --git a/rb/test/Ice/slicing/objects/AllTests.rb b/rb/test/Ice/slicing/objects/AllTests.rb
index ff301ee..b60d1ea 100644
--- a/rb/test/Ice/slicing/objects/AllTests.rb
+++ b/rb/test/Ice/slicing/objects/AllTests.rb
@@ -342,6 +342,84 @@ def allTests(communicator)
end
puts "ok"
+ print "return value unsliced for input params known first..."
+ STDOUT.flush
+ begin
+ d1 = Test::D1.new
+ d1.sb = "D1.sb"
+ d1.sd1 = "D1.sd1"
+ d5 = Test::D5.new
+ d5.pb = d1
+ d5.sb = "D5.sb"
+ d5.sd5 = "D5.sd5"
+ d5.pd5 = d1
+ d1.pb = d5
+ d1.pd1 = d5
+
+ b1 = t.returnTest3(d1, d5)
+
+ test(b1)
+ test(b1.sb == "D1.sb")
+ test(b1.ice_id() == "::Test::D1")
+ p3 = b1
+ test(p3.is_a?(Test::D1))
+ test(p3.sd1 == "D1.sd1")
+
+ b2 = b1.pb
+ test(b2)
+ test(b2.sb == "D5.sb")
+ test(b2.ice_id() == "::Test::D5") # Not sliced by server
+ p1 = b2
+ test(p1.is_a?(Test::D5))
+
+ test(b1 != d1)
+ test(b1 != d3)
+ test(b2 != d1)
+ test(b2 != d3)
+
+ rescue Ice::Exception
+ test(false)
+ end
+
+ print "return value unsliced for input params unknown first..."
+ STDOUT.flush
+ begin
+ d1 = Test::D1.new
+ d1.sb = "D1.sb"
+ d1.sd1 = "D1.sd1"
+ d5 = Test::D5.new
+ d5.pb = d1
+ d5.sb = "D5.sb"
+ d5.sd5 = "D5.sd5"
+ d5.pd5 = d1
+ d1.pb = d5
+ d1.pd1 = d5
+
+ b2 = t.returnTest3(d5, d1)
+
+ test(b2)
+ test(b2.sb == "D5.sb")
+ test(b2.ice_id() == "::Test::D5") # Not sliced by server
+ p1 = b2
+ test(p1.is_a?(Test::D5))
+
+ b1 = d5.pb
+ test(b1)
+ test(b1.sb == "D1.sb")
+ test(b1.ice_id() == "::Test::D1")
+ p3 = b1
+ test(p3.is_a?(Test::D1))
+ test(p3.sd1 == "D1.sd1")
+
+ test(b1 != d5)
+ test(b1 != p1)
+ test(b2 != d1)
+ test(b2 != p3)
+
+ rescue Ice::Exception
+ test(false)
+ end
+
print "remainder unmarshaling (3 instances)... "
STDOUT.flush
begin
@@ -385,6 +463,48 @@ def allTests(communicator)
end
puts "ok"
+ print "object graphs of unsliceable objects..."
+ STDOUT.flush
+ begin
+ graphBase = Test::GraphBase.new
+ d6 = Test::D6.new
+ d6.sd6 = "d6.1"
+ d6.innerD5 = Test::D5.new
+ d6.innerD5.sd5 = "d6.1.d5"
+ d6.innerD5.pd5 = Test::B.new
+ d6.innerD5.pd5.sb = "d6.1.d5.sb"
+ d6.innerD5.pd5.pb = Test::B.new
+ d6.innerD5.pd5.pb.sb = "d6.1.d5.sb.sb"
+ graphBase.left = d6
+
+ d7 = Test::D7.new
+ d7.sd7 = "d7"
+ d7.innerD7 = Test::D7.new
+ d7.innerD7.sd7 = "d7.d7"
+ d7.innerD7.innerD7 = Test::D7.new
+ d7.innerD7.innerD7.sd7 = "d7.d7.d7"
+ graphBase.right = d7
+
+ result = t.returnTest3(graphBase, d7)
+ test(result)
+ test(result.left.sd6 == "d6.1")
+ test(result.left.innerD5)
+ test(result.left.innerD5.sd5 == "d6.1.d5")
+ test(result.left.innerD5.pd5)
+ test(result.left.innerD5.pd5.sb == "d6.1.d5.sb")
+ test(result.left.innerD5.pd5.pb)
+ test(result.left.innerD5.pd5.pb.sb == "d6.1.d5.sb.sb")
+
+ test(result.right.sd7 == "d7")
+ test(result.right.innerD7)
+ test(result.right.innerD7.sd7 == "d7.d7")
+ test(result.right.innerD7.innerD7)
+ test(result.right.innerD7.innerD7.sd7 == "d7.d7.d7")
+
+ rescue Ice::Exception
+ test(false)
+ end
+
print "param ptr slicing, instance marshaled in unknown derived as base... "
STDOUT.flush
begin
@@ -521,6 +641,82 @@ def allTests(communicator)
end
puts "ok"
+ print "sequence with unsliceable objects... "
+ STDOUT.flush
+ begin
+ ss = Test::SS.new
+ ss1b = Test::B.new
+ ss1b.sb = "B.sb"
+ ss1b.pb = ss1b
+
+ ss1d1 = Test::D1.new
+ ss1d1.sb = "D1.sb"
+ ss1d1.sd1 = "D1.sd1"
+ ss1d1.pb = ss1b
+
+ ss1d5 = Test::D5.new
+ ss1d5.sb = "D5.sb"
+ ss1d5.sd5 = "D5.sd5"
+ ss1d5.pb = ss1b
+
+ ss2b = Test::B.new
+ ss2b.sb = "B.sb"
+ ss2b.pb = ss1b
+
+ ss2d1 = Test::D1.new
+ ss2d1.sb = "D1.sb"
+ ss2d1.sd1 = "D1.sd1"
+ ss2d1.pb = ss2b
+
+ ss2d5 = Test::D5.new
+ ss2d5.sb = "D5.sb"
+ ss2d5.sd5 = "D5.sd5"
+ ss2d5.pb = ss2b
+
+ ss1d1.pd1 = ss2b
+ ss1d5.pd5 = ss2d1
+
+ ss2d1.pd1 = ss1d3
+ ss2d5.pd5 = ss1d1
+
+ ss1 = Test::SS1.new
+ ss1.s = [ss1b, ss1d1, ss1d5]
+
+ ss2 = Test::SS2.new
+ ss2.s = [ss2b, ss2d1, ss2d5]
+
+ ss = t.sequenceTest(ss1, ss2)
... 22772 lines suppressed ...
--
asterisk-scf/release/ice.git
More information about the asterisk-scf-commits
mailing list