diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-01-28 15:11:03 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-01-28 15:11:03 +0100 |
commit | c91e5471985115579c6a80fa07ad40c8d1911484 (patch) | |
tree | 046af8995e61c05e0d3aa9842fc0efac0d5e0cbb /php/src/IcePHP/Operation.cpp | |
parent | g++4.6 compilation warning (diff) | |
download | ice-c91e5471985115579c6a80fa07ad40c8d1911484.tar.bz2 ice-c91e5471985115579c6a80fa07ad40c8d1911484.tar.xz ice-c91e5471985115579c6a80fa07ad40c8d1911484.zip |
Fixed Ice for Python/Ruby/PHP to not copy data from output stream
Diffstat (limited to 'php/src/IcePHP/Operation.cpp')
-rw-r--r-- | php/src/IcePHP/Operation.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/php/src/IcePHP/Operation.cpp b/php/src/IcePHP/Operation.cpp index 412de85e9b5..a37eb6e1d13 100644 --- a/php/src/IcePHP/Operation.cpp +++ b/php/src/IcePHP/Operation.cpp @@ -129,7 +129,7 @@ protected: OperationIPtr _op; - bool prepareRequest(int, zval**, Ice::ByteSeq& TSRMLS_DC); + bool prepareRequest(int, zval**, Ice::OutputStreamPtr&, pair<const Ice::Byte*, const Ice::Byte*>& TSRMLS_DC); void unmarshalResults(int, zval**, zval*, const pair<const Ice::Byte*, const Ice::Byte*>& TSRMLS_DC); zval* unmarshalException(const pair<const Ice::Byte*, const Ice::Byte*>& TSRMLS_DC); bool validateException(const ExceptionInfoPtr& TSRMLS_DC) const; @@ -460,7 +460,8 @@ IcePHP::TypedInvocation::TypedInvocation(const Ice::ObjectPrx& prx, const Commun } bool -IcePHP::TypedInvocation::prepareRequest(int argc, zval** args, Ice::ByteSeq& bytes TSRMLS_DC) +IcePHP::TypedInvocation::prepareRequest(int argc, zval** args, Ice::OutputStreamPtr& os, + pair<const Ice::Byte*, const Ice::Byte*>& params TSRMLS_DC) { // // Verify that the expected number of arguments are supplied. The context argument is optional. @@ -487,7 +488,7 @@ IcePHP::TypedInvocation::prepareRequest(int argc, zval** args, Ice::ByteSeq& byt // // Marshal the in parameters. // - Ice::OutputStreamPtr os = Ice::createOutputStream(_communicator->getCommunicator()); + os = Ice::createOutputStream(_communicator->getCommunicator()); os->startEncapsulation(_prx->ice_getEncodingVersion(), _op->format); ObjectMap objectMap; @@ -540,7 +541,7 @@ IcePHP::TypedInvocation::prepareRequest(int argc, zval** args, Ice::ByteSeq& byt } os->endEncapsulation(); - os->finished(bytes); + params = os->finished(); } catch(const AbortMarshaling&) { @@ -769,9 +770,10 @@ IcePHP::SyncTypedInvocation::invoke(INTERNAL_FUNCTION_PARAMETERS) runtimeError("unable to get arguments" TSRMLS_CC); return; } - - Ice::ByteSeq params; - if(!prepareRequest(ZEND_NUM_ARGS(), *args, params TSRMLS_CC)) + + Ice::OutputStreamPtr os; + pair<const Ice::Byte*, const Ice::Byte*> params; + if(!prepareRequest(ZEND_NUM_ARGS(), *args, os, params TSRMLS_CC)) { return; } |