- 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? :)
This commit is contained in:
foobar 2005-01-20 02:02:09 +00:00
parent 480a3b08d5
commit 2c65e09a4b
4 changed files with 10 additions and 10 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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)

View File

@ -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);