From: Frank M. Kromann Date: Sat, 29 Apr 2006 14:53:26 +0000 (+0000) Subject: More ZSTR() fixes X-Git-Tag: BEFORE_NEW_OUTPUT_API~346 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=954199c9fbd0513d24d387391d20e09b24068104;p=php More ZSTR() fixes --- diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index f4d5d48c8e..bf85246faa 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -189,7 +189,7 @@ static char *dsn_from_uri(char *uri, char *buf, size_t buflen TSRMLS_DC) /* {{{ stream = php_stream_open_wrapper(uri, "rb", REPORT_ERRORS, NULL); if (stream) { - dsn = php_stream_get_line(stream, buf, buflen, NULL); + dsn = php_stream_get_line(stream, ZSTR(buf), buflen, NULL); php_stream_close(stream); } return dsn; diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 1dccf6610c..1a763f049d 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -92,7 +92,7 @@ int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC) if (type != 3) { b = buf; - while (php_stream_get_line(stream, b, EXEC_INPUT_BUF, &bufl)) { + while (php_stream_get_line(stream, ZSTR(b), EXEC_INPUT_BUF, &bufl)) { /* no new line found, let's read some more */ if (b[bufl - 1] != '\n' && !php_stream_eof(stream)) { if (buflen < (bufl + (b - buf) + EXEC_INPUT_BUF)) { diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 871250f7de..5bac0ba550 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -71,7 +71,7 @@ static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size TSRMLS_DC) { - while (php_stream_gets(stream, buffer, buffer_size-1) && + while (php_stream_gets(stream, ZSTR(buffer), buffer_size-1) && !(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) && isdigit((int) buffer[2]) && buffer[3] == ' ')); return strtol(buffer, NULL, 10); @@ -595,7 +595,7 @@ static size_t php_ftp_dirstream_read(php_stream *stream, char *buf, size_t count return 0; } - if (!php_stream_get_line(innerstream, ent->d_name, sizeof(ent->d_name), &tmp_len)) { + if (!php_stream_get_line(innerstream, ZSTR(ent->d_name), sizeof(ent->d_name), &tmp_len)) { return 0; } diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 864975414c..476d0d6c79 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1146,7 +1146,7 @@ int main(int argc, char *argv[]) Z_LVAL_P(argi) = index; INIT_PZVAL(argi); zend_hash_update(&EG(symbol_table), "argi", sizeof("argi"), &argi, sizeof(zval *), NULL); - while (exit_status == SUCCESS && (input=php_stream_gets(s_in_process, NULL, 0)) != NULL) { + while (exit_status == SUCCESS && (input=php_stream_gets(s_in_process, NULL_ZSTR, 0)) != NULL) { len = strlen(input); while (len-- && (input[len]=='\n' || input[len]=='\r')) { input[len] = '\0';