andrei Fri Mar 17 22:52:55 2006 UTC
Modified files:
/php-src/ext/spl spl_directory.c
/php-src/ext/standard file.c image.c
/php-src/main/streams streams.c
/php-src/sapi/cli php_cli.c
Log:
Fix compiler errors by using NULL_ZSTR where zstr is expected.
# I guess we need to use NULL_ZSTR instead of NULL when passing NULL to
# functions that expect zstr parameter.
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.85&r2=1.86&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.85
php-src/ext/spl/spl_directory.c:1.86
--- php-src/ext/spl/spl_directory.c:1.85 Thu Mar 9 23:03:08 2006
+++ php-src/ext/spl/spl_directory.c Fri Mar 17 22:52:55 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_directory.c,v 1.85 2006/03/09 23:03:08 helly Exp $ */
+/* $Id: spl_directory.c,v 1.86 2006/03/17 22:52:55 andrei Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -1349,7 +1349,7 @@
return FAILURE;
}
- buf = php_stream_get_line(intern->u.file.stream, NULL,
intern->u.file.max_line_len, &line_len);
+ buf = php_stream_get_line(intern->u.file.stream, NULL_ZSTR,
intern->u.file.max_line_len, &line_len);
if (!buf) {
intern->u.file.current_line = estrdup("");
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.427&r2=1.428&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.427 php-src/ext/standard/file.c:1.428
--- php-src/ext/standard/file.c:1.427 Wed Mar 15 00:28:57 2006
+++ php-src/ext/standard/file.c Fri Mar 17 22:52:55 2006
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.427 2006/03/15 00:28:57 pollita Exp $ */
+/* $Id: file.c,v 1.428 2006/03/17 22:52:55 andrei Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -1002,7 +1002,7 @@
php_stream_from_zval(stream, &zstream);
- buf.v = php_stream_get_line_ex(stream, php_stream_reads_unicode(stream)
? IS_UNICODE : IS_STRING, NULL, 0, length, &retlen);
+ buf.v = php_stream_get_line_ex(stream, php_stream_reads_unicode(stream)
? IS_UNICODE : IS_STRING, NULL_ZSTR, 0, length, &retlen);
if (!buf.v) {
RETURN_FALSE;
}
@@ -1157,7 +1157,7 @@
}
- buf = php_stream_get_line((php_stream *) what, NULL, 0, &len);
+ buf = php_stream_get_line((php_stream *) what, NULL_ZSTR, 0, &len);
if (buf == NULL) {
efree(args);
RETURN_FALSE;
@@ -1991,7 +1991,7 @@
}
if (len < 0) {
- if ((buf = php_stream_get_line(stream, NULL, 0, &buf_len)) ==
NULL) {
+ if ((buf = php_stream_get_line(stream, NULL_ZSTR, 0, &buf_len))
== NULL) {
RETURN_FALSE;
}
} else {
@@ -2088,7 +2088,7 @@
memcpy(tptr,
line_end, line_end_len);
tptr +=
line_end_len;
- if ((new_buf =
php_stream_get_line(stream, NULL, 0, &new_len)) == NULL) {
+ if ((new_buf =
php_stream_get_line(stream, NULL_ZSTR, 0, &new_len)) == NULL) {
/*
we've got an unterminated enclosure,
*
assign all the data from the start of
* the
enclosure to end of data to the
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/image.c?r1=1.120&r2=1.121&diff_format=u
Index: php-src/ext/standard/image.c
diff -u php-src/ext/standard/image.c:1.120 php-src/ext/standard/image.c:1.121
--- php-src/ext/standard/image.c:1.120 Thu Mar 2 13:12:45 2006
+++ php-src/ext/standard/image.c Fri Mar 17 22:52:55 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: image.c,v 1.120 2006/03/02 13:12:45 dmitry Exp $ */
+/* $Id: image.c,v 1.121 2006/03/17 22:52:55 andrei Exp $ */
#include "php.h"
#include <stdio.h>
@@ -1023,7 +1023,7 @@
if (php_stream_rewind(stream)) {
return 0;
}
- while ((fline=php_stream_gets(stream, NULL, 0)) != NULL) {
+ while ((fline=php_stream_gets(stream, NULL_ZSTR, 0)) != NULL) {
iname = estrdup(fline); /* simple way to get necessary buffer
of required size */
if (sscanf(fline, "#define %s %d", iname, &value) == 2) {
if (!(type = strrchr(iname, '_'))) {
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/streams.c?r1=1.105&r2=1.106&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.105
php-src/main/streams/streams.c:1.106
--- php-src/main/streams/streams.c:1.105 Thu Mar 16 00:53:58 2006
+++ php-src/main/streams/streams.c Fri Mar 17 22:52:55 2006
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.105 2006/03/16 00:53:58 helly Exp $ */
+/* $Id: streams.c,v 1.106 2006/03/17 22:52:55 andrei Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -1008,7 +1008,7 @@
UChar *eol;
readptr.u = stream->readbuf.u + stream->readpos;
- eol = php_stream_locate_eol(stream, ZSTR(NULL),
0 TSRMLS_CC);
+ eol = php_stream_locate_eol(stream, NULL_ZSTR,
0 TSRMLS_CC);
if (eol) {
cpysz = eol - readptr.u + 1;
done = 1;
@@ -1027,7 +1027,7 @@
} else {
char *eol;
readptr.s = stream->readbuf.s + stream->readpos;
- eol = php_stream_locate_eol(stream, ZSTR(NULL),
0 TSRMLS_CC);
+ eol = php_stream_locate_eol(stream, NULL_ZSTR,
0 TSRMLS_CC);
if (eol) {
cpysz = eol - readptr.s + 1;
done = 1;
@@ -1337,7 +1337,7 @@
int ret = 0;
if (stream->writefilters.head) {
- _php_stream_write_filtered(stream, IS_STRING, ZSTR(NULL), 0,
closing ? PSFS_FLAG_FLUSH_CLOSE : PSFS_FLAG_FLUSH_INC TSRMLS_CC);
+ _php_stream_write_filtered(stream, IS_STRING, NULL_ZSTR, 0,
closing ? PSFS_FLAG_FLUSH_CLOSE : PSFS_FLAG_FLUSH_INC TSRMLS_CC);
}
if (stream->ops->flush) {
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cli/php_cli.c?r1=1.149&r2=1.150&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.149 php-src/sapi/cli/php_cli.c:1.150
--- php-src/sapi/cli/php_cli.c:1.149 Fri Mar 17 13:45:43 2006
+++ php-src/sapi/cli/php_cli.c Fri Mar 17 22:52:55 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_cli.c,v 1.149 2006/03/17 13:45:43 dmitry Exp $ */
+/* $Id: php_cli.c,v 1.150 2006/03/17 22:52:55 andrei Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1146,7 +1146,7 @@
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';
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php