summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2014-02-06 09:38:50 +0100
committerBob Weinand <bobwei9@hotmail.com>2014-02-06 09:38:50 +0100
commit45d2df5f119d17804ccf6068cbe1132e118579b2 (patch)
treee3014245763e4290de480fad0b1142728314b965 /sapi/cli
parentb33060af82c648bb3971de9d8fe67e52781cbd7a (diff)
parente5ded6e843fc43dde4b6c65405a1d3e2ae026eb4 (diff)
downloadphp-git-broken-5.6-20140206.tar.gz
Merge branch 'datibbaw/pow-operator' into PHP-5.6broken-5.6-20140206
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/php_cli.c6
-rw-r--r--sapi/cli/php_cli_server.c8
2 files changed, 6 insertions, 8 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 9daa382eec..7c971176b6 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -320,7 +320,7 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{
}
/* }}} */
-static void sapi_cli_flush(void *server_context) /* {{{ */
+static void sapi_cli_flush(void *server_context TSRMLS_DC) /* {{{ */
{
/* Ignore EBADF here, it's caused by the fact that STDIN/STDOUT/STDERR streams
* are/could be closed before fflush() is called.
@@ -870,7 +870,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
break;
case 'z': /* load extension file */
- zend_load_extension(php_optarg);
+ zend_load_extension(php_optarg TSRMLS_CC);
break;
case 'H':
hide_argv = 1;
@@ -1024,7 +1024,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
/* Zeev might want to do something with this one day */
case PHP_MODE_INDENT:
open_file_for_scanning(&file_handle TSRMLS_CC);
- zend_indent();
+ zend_indent(TSRMLS_C);
zend_file_handle_dtor(file_handle.handle TSRMLS_CC);
goto out;
break;
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 3f2aaf0088..2c68fa17a4 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -614,10 +614,9 @@ static int sapi_cli_server_ub_write(const char *str, uint str_length TSRMLS_DC)
return php_cli_server_client_send_through(client, str, str_length);
} /* }}} */
-static void sapi_cli_server_flush(void *server_context) /* {{{ */
+static void sapi_cli_server_flush(void *server_context TSRMLS_DC) /* {{{ */
{
php_cli_server_client *client = server_context;
- TSRMLS_FETCH();
if (!client) {
return;
@@ -1144,7 +1143,7 @@ static int php_cli_server_content_sender_send(php_cli_server_content_sender *sen
return 0;
} /* }}} */
-static int php_cli_server_content_sender_pull(php_cli_server_content_sender *sender, int fd, size_t *nbytes_read) /* {{{ */
+static int php_cli_server_content_sender_pull(php_cli_server_content_sender *sender, int fd, size_t *nbytes_read TSRMLS_DC) /* {{{ */
{
ssize_t _nbytes_read;
php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(131072);
@@ -1152,7 +1151,6 @@ static int php_cli_server_content_sender_pull(php_cli_server_content_sender *sen
_nbytes_read = read(fd, chunk->data.heap.p, chunk->data.heap.len);
if (_nbytes_read < 0) {
char *errstr = get_last_error();
- TSRMLS_FETCH();
php_cli_server_logf("%s" TSRMLS_CC, errstr);
pefree(errstr, 1);
php_cli_server_chunk_dtor(chunk);
@@ -2368,7 +2366,7 @@ static int php_cli_server_send_event(php_cli_server *server, php_cli_server_clie
if (client->content_sender_initialized) {
if (client->file_fd >= 0 && !client->content_sender.buffer.first) {
size_t nbytes_read;
- if (php_cli_server_content_sender_pull(&client->content_sender, client->file_fd, &nbytes_read)) {
+ if (php_cli_server_content_sender_pull(&client->content_sender, client->file_fd, &nbytes_read TSRMLS_CC)) {
php_cli_server_close_connection(server, client TSRMLS_CC);
return FAILURE;
}