diff options
author | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-12-13 23:06:14 +0100 |
commit | bdeb220f48825642f84cdbf3ff23a30613c92e86 (patch) | |
tree | 1a6cf34d20420e4815b4becb21311a4457d84103 /ext/shmop | |
parent | bb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff) | |
download | php-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz |
first shot remove TSRMLS_* things
Diffstat (limited to 'ext/shmop')
-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; } |