diff options
author | Jose <jose@zeroc.com> | 2017-02-06 17:39:23 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-02-06 17:39:23 +0100 |
commit | 8c3e55b2defa3ac108474738ae168b1942632213 (patch) | |
tree | 3dbbe11cf28c52225cc16ea0df1f1f7ea6fde496 /php/src/php7/Communicator.cpp | |
parent | Add support for build with VS 2017 RC (diff) | |
download | ice-8c3e55b2defa3ac108474738ae168b1942632213.tar.bz2 ice-8c3e55b2defa3ac108474738ae168b1942632213.tar.xz ice-8c3e55b2defa3ac108474738ae168b1942632213.zip |
Fix ICE-7561 - PHP Build failure
Diffstat (limited to 'php/src/php7/Communicator.cpp')
-rw-r--r-- | php/src/php7/Communicator.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/php/src/php7/Communicator.cpp b/php/src/php7/Communicator.cpp index b707cf962c6..2c63100e908 100644 --- a/php/src/php7/Communicator.cpp +++ b/php/src/php7/Communicator.cpp @@ -813,21 +813,29 @@ ZEND_METHOD(Ice_Communicator, setDefaultLocator) ZEND_METHOD(Ice_Communicator, flushBatchRequests) { - CommunicatorInfoIPtr _this = Wrapper<CommunicatorInfoIPtr>::value(getThis()); - assert(_this); + zval* compress; + if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, const_cast<char*>("z"), &compress TSRMLS_CC) != SUCCESS) + { + RETURN_NULL(); + } - if(ZEND_NUM_ARGS() != 8) + if(Z_TYPE_P(compress) != IS_LONG) { - WRONG_PARAM_COUNT; + invalidArgument("value for 'compress' argument must be an enumerator of CompressBatch" TSRMLS_CC); + RETURN_NULL(); } + Ice::CompressBatch cb = static_cast<Ice::CompressBatch>(Z_LVAL_P(compress)); + + CommunicatorInfoIPtr _this = Wrapper<CommunicatorInfoIPtr>::value(getThis() TSRMLS_CC); + assert(_this); try { - _this->getCommunicator()->flushBatchRequests(); + _this->getCommunicator()->flushBatchRequests(cb); } catch(const IceUtil::Exception& ex) { - throwException(ex); + throwException(ex TSRMLS_CC); RETURN_NULL(); } } |