diff options
author | Anatol Belski <ab@php.net> | 2014-12-18 10:09:02 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-18 10:09:02 +0100 |
commit | 4b943c9c0dd4114adc78416c5241f11ad5c98a80 (patch) | |
tree | c9628d91eae3f580f9ebd73d2372e4c9089b2e00 /ext/shmop/shmop.c | |
parent | 79354ba6d0d6a1a4596f9ac66ee9bc3a34ed972b (diff) | |
parent | dec8eb431adee340fb8dfb9ff33ed29d3279c35f (diff) | |
download | php-git-POST_NATIVE_TLS_MERGE.tar.gz |
Merge remote-tracking branch 'origin/native-tls'POST_NATIVE_TLS_MERGE
Diffstat (limited to 'ext/shmop/shmop.c')
-rw-r--r-- | ext/shmop/shmop.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 4bf9d7dedf..276fbed533 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -113,7 +113,7 @@ ZEND_GET_MODULE(shmop) /* {{{ rsclean */ -static void rsclean(zend_resource *rsrc TSRMLS_DC) +static void rsclean(zend_resource *rsrc) { struct php_shmop *shmop = (struct php_shmop *)rsrc->ptr; @@ -152,12 +152,12 @@ PHP_FUNCTION(shmop_open) char *flags; size_t flags_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsll", &key, &flags, &flags_len, &mode, &size) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lsll", &key, &flags, &flags_len, &mode, &size) == FAILURE) { return; } if (flags_len != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not a valid flag", flags); + php_error_docref(NULL, E_WARNING, "%s is not a valid flag", flags); RETURN_FALSE; } @@ -187,29 +187,29 @@ PHP_FUNCTION(shmop_open) */ break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid access mode"); + php_error_docref(NULL, E_WARNING, "invalid access mode"); goto err; } if (shmop->shmflg & IPC_CREAT && shmop->size < 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Shared memory segment size must be greater than zero"); + php_error_docref(NULL, E_WARNING, "Shared memory segment size must be greater than zero"); goto err; } shmop->shmid = shmget(shmop->key, shmop->size, shmop->shmflg); if (shmop->shmid == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to attach or create shared memory segment '%s'", strerror(errno)); + php_error_docref(NULL, E_WARNING, "unable to attach or create shared memory segment '%s'", strerror(errno)); goto err; } if (shmctl(shmop->shmid, IPC_STAT, &shm)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to get shared memory segment information '%s'", strerror(errno)); + php_error_docref(NULL, E_WARNING, "unable to get shared memory segment information '%s'", strerror(errno)); goto err; } shmop->addr = shmat(shmop->shmid, 0, shmop->shmatflg); if (shmop->addr == (char*) -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to attach to shared memory segment '%s'", strerror(errno)); + php_error_docref(NULL, E_WARNING, "unable to attach to shared memory segment '%s'", strerror(errno)); goto err; } @@ -233,19 +233,19 @@ PHP_FUNCTION(shmop_read) int bytes; zend_string *return_string; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &shmid, &start, &count) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &shmid, &start, &count) == FAILURE) { return; } ZEND_FETCH_RESOURCE(shmop, struct php_shmop *, NULL, shmid, "shmop", shm_type); if (start < 0 || start > shmop->size) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "start is out of range"); + php_error_docref(NULL, E_WARNING, "start is out of range"); RETURN_FALSE; } if (count < 0 || start > (INT_MAX - count) || start + count > shmop->size) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "count is out of range"); + php_error_docref(NULL, E_WARNING, "count is out of range"); RETURN_FALSE; } @@ -265,7 +265,7 @@ PHP_FUNCTION(shmop_close) zend_long shmid; zval *res; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &shmid) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &shmid) == FAILURE) { return; } @@ -283,7 +283,7 @@ PHP_FUNCTION(shmop_size) zend_long shmid; struct php_shmop *shmop; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &shmid) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &shmid) == FAILURE) { return; } @@ -302,19 +302,19 @@ PHP_FUNCTION(shmop_write) zend_long shmid, offset; zend_string *data; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lSl", &shmid, &data, &offset) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lSl", &shmid, &data, &offset) == FAILURE) { return; } ZEND_FETCH_RESOURCE(shmop, struct php_shmop *, NULL, shmid, "shmop", shm_type); if ((shmop->shmatflg & SHM_RDONLY) == SHM_RDONLY) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "trying to write to a read only segment"); + php_error_docref(NULL, E_WARNING, "trying to write to a read only segment"); RETURN_FALSE; } if (offset < 0 || offset > shmop->size) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "offset out of range"); + php_error_docref(NULL, E_WARNING, "offset out of range"); RETURN_FALSE; } @@ -332,14 +332,14 @@ PHP_FUNCTION(shmop_delete) zend_long shmid; struct php_shmop *shmop; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &shmid) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &shmid) == FAILURE) { return; } ZEND_FETCH_RESOURCE(shmop, struct php_shmop *, NULL, shmid, "shmop", shm_type); if (shmctl(shmop->shmid, IPC_RMID, NULL)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "can't mark segment for deletion (are you the owner?)"); + php_error_docref(NULL, E_WARNING, "can't mark segment for deletion (are you the owner?)"); RETURN_FALSE; } |