]> granicus.if.org Git - php/commitdiff
More ZSTR() fixes
authorFrank M. Kromann <fmk@php.net>
Sat, 29 Apr 2006 14:53:26 +0000 (14:53 +0000)
committerFrank M. Kromann <fmk@php.net>
Sat, 29 Apr 2006 14:53:26 +0000 (14:53 +0000)
ext/pdo/pdo_dbh.c
ext/standard/exec.c
ext/standard/ftp_fopen_wrapper.c
sapi/cli/php_cli.c

index f4d5d48c8e373b9f2d29ec20091dda6d9e8420f1..bf85246faa6a72c002078e2ca82895f8803cd1bc 100755 (executable)
@@ -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;
index 1dccf6610ca1f1c5ca42504a6d7fa71d49caf44d..1a763f049d64c84ad67e8051e4ec86fc2aabeebd 100644 (file)
@@ -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)) {
index 871250f7deb11e5ef8b1c5fb8ce03119a1f211e8..5bac0ba5507d0d99ef1adf42e18c84089be8f649 100644 (file)
@@ -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;
        }
 
index 864975414caa323ec496e154385ccb36e0d064c3..476d0d6c7934aaffd5d8911744d20c77ba0e9dde 100644 (file)
@@ -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';