summaryrefslogtreecommitdiff
path: root/ext/sysvmsg
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-06-05 16:04:11 +0400
committerDmitry Stogov <dmitry@zend.com>2014-06-05 16:04:11 +0400
commitc1965f58d4dd3970912dcd6a63ccd5860bae1a97 (patch)
tree15b4a94e8e8405f791438c468ad4eb03f60c4079 /ext/sysvmsg
parent3d87391cc06fe87344536e88ac74ded22b0195cf (diff)
downloadphp-git-c1965f58d4dd3970912dcd6a63ccd5860bae1a97.tar.gz
Use reference counting instead of zval duplication
Diffstat (limited to 'ext/sysvmsg')
-rw-r--r--ext/sysvmsg/sysvmsg.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 83875ac9ee..b1cbedbbc1 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -308,7 +308,7 @@ PHP_FUNCTION(msg_receive)
RETVAL_FALSE;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlzlz|blz",
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz/lz/|blz/",
&queue, &desiredmsgtype, &out_msgtype, &maxsize,
&out_message, &do_unserialize, &flags, &zerrcode) == FAILURE) {
return;
@@ -342,8 +342,6 @@ PHP_FUNCTION(msg_receive)
result = msgrcv(mq->id, messagebuffer, maxsize, desiredmsgtype, realflags);
- ZVAL_DEREF(out_msgtype);
- ZVAL_DEREF(out_message);
zval_dtor(out_msgtype);
zval_dtor(out_message);
ZVAL_LONG(out_msgtype, 0);
@@ -397,7 +395,7 @@ PHP_FUNCTION(msg_send)
RETVAL_FALSE;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz|bbz",
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz|bbz/",
&queue, &msgtype, &message, &do_serialize, &blocking, &zerror) == FAILURE) {
return;
}
@@ -461,7 +459,6 @@ PHP_FUNCTION(msg_send)
if (result == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "msgsnd failed: %s", strerror(errno));
if (zerror) {
- ZVAL_DEREF(zerror);
ZVAL_LONG(zerror, errno);
}
} else {