summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-01-20 02:02:09 +0000
committerfoobar <sniper@php.net>2005-01-20 02:02:09 +0000
commit2c65e09a4b5332fb35e785506a014da4502c7a8f (patch)
tree93687ed08c718ffd282b3511057edb204252a618
parent480a3b08d5a045fb228a5ee628b5108db82ec2a6 (diff)
downloadphp-git-2c65e09a4b5332fb35e785506a014da4502c7a8f.tar.gz
- Revert the weird change of ZEND_STRS() macro and use the correct
ZEND_STRL() macro. # ZEND_STRS was changed to be same as ZEND_STRL..someone on crack? :)
-rw-r--r--Zend/zend.h2
-rw-r--r--Zend/zend_constants.c8
-rw-r--r--ext/ncurses/ncurses_functions.c4
-rw-r--r--sapi/cli/php_cli.c6
4 files changed, 10 insertions, 10 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index 9e74d851b2..5c9ec20873 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -377,7 +377,7 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
#define MAX(a, b) (((a)>(b))?(a):(b))
#define MIN(a, b) (((a)<(b))?(a):(b))
#define ZEND_STRL(str) (str), (sizeof(str)-1)
-#define ZEND_STRS(str) (str), (sizeof(str)-1)
+#define ZEND_STRS(str) (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)>0) ? 1 : -1) : 0)
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 0b913edbe5..2b0eba73f9 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -116,25 +116,25 @@ void zend_register_standard_constants(TSRMLS_D)
c.flags = CONST_PERSISTENT;
c.module_number = 0;
- c.name = zend_strndup(ZEND_STRS("TRUE"));
+ c.name = zend_strndup(ZEND_STRL("TRUE"));
c.name_len = sizeof("TRUE");
c.value.value.lval = 1;
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
- c.name = zend_strndup(ZEND_STRS("FALSE"));
+ c.name = zend_strndup(ZEND_STRL("FALSE"));
c.name_len = sizeof("FALSE");
c.value.value.lval = 0;
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
- c.name = zend_strndup(ZEND_STRS("ZEND_THREAD_SAFE"));
+ c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
c.name_len = sizeof("ZEND_THREAD_SAFE");
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(&c TSRMLS_CC);
- c.name = zend_strndup(ZEND_STRS("NULL"));
+ c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
zend_register_constant(&c TSRMLS_CC);
diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c
index 90d416eb46..7a770a009f 100644
--- a/ext/ncurses/ncurses_functions.c
+++ b/ext/ncurses/ncurses_functions.c
@@ -149,7 +149,7 @@ PHP_FUNCTION(ncurses_init)
c.value = *zscr;
zval_copy_ctor(&c.value);
c.flags = CONST_CS;
- c.name = zend_strndup(ZEND_STRS("STDSCR"));
+ c.name = zend_strndup(ZEND_STRL("STDSCR"));
c.name_len = sizeof("STDSCR");
zend_register_constant(&c TSRMLS_CC);
@@ -162,7 +162,7 @@ PHP_FUNCTION(ncurses_init)
c.value = *zscr; \
zval_copy_ctor(&c.value); \
c.flags = CONST_CS; \
- c.name = zend_strndup(ZEND_STRS("NCURSES_" #x)); \
+ c.name = zend_strndup(ZEND_STRL("NCURSES_" #x)); \
c.name_len = sizeof("NCURSES_" #x); \
zend_register_constant(&c TSRMLS_CC)
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index ea0b0346a2..6ab3bb7822 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -455,21 +455,21 @@ static void cli_register_file_handles(TSRMLS_D)
ic.value = *zin;
ic.flags = CONST_CS;
- ic.name = zend_strndup(ZEND_STRS("STDIN"));
+ ic.name = zend_strndup(ZEND_STRL("STDIN"));
ic.name_len = sizeof("STDIN");
ic.module_number = 0;
zend_register_constant(&ic TSRMLS_CC);
oc.value = *zout;
oc.flags = CONST_CS;
- oc.name = zend_strndup(ZEND_STRS("STDOUT"));
+ oc.name = zend_strndup(ZEND_STRL("STDOUT"));
oc.name_len = sizeof("STDOUT");
oc.module_number = 0;
zend_register_constant(&oc TSRMLS_CC);
ec.value = *zerr;
ec.flags = CONST_CS;
- ec.name = zend_strndup(ZEND_STRS("STDERR"));
+ ec.name = zend_strndup(ZEND_STRL("STDERR"));
ec.name_len = sizeof("STDERR");
ec.module_number = 0;
zend_register_constant(&ec TSRMLS_CC);