iliaa Thu Dec 11 19:23:15 2003 EDT Modified files: /php-src/ext/ncurses ncurses_functions.c Log: Fixed extra byte allocation in constant creation code. Index: php-src/ext/ncurses/ncurses_functions.c diff -u php-src/ext/ncurses/ncurses_functions.c:1.42 php-src/ext/ncurses/ncurses_functions.c:1.43 --- php-src/ext/ncurses/ncurses_functions.c:1.42 Mon Jun 16 12:36:41 2003 +++ php-src/ext/ncurses/ncurses_functions.c Thu Dec 11 19:23:15 2003 @@ -149,8 +149,8 @@ c.value = *zscr; zval_copy_ctor(&c.value); c.flags = CONST_CS; - c.name = zend_strndup("STDSCR", 7); - c.name_len = 7; + c.name = zend_strndup(ZEND_STRS("STDSCR")); + c.name_len = sizeof("STDSCR"); zend_register_constant(&c TSRMLS_CC); /* we need this "interesting" arrangement because the @@ -162,7 +162,7 @@ c.value = *zscr; \ zval_copy_ctor(&c.value); \ c.flags = CONST_CS; \ - c.name = zend_strndup("NCURSES_" #x, sizeof("NCURSES_" #x)); \ + c.name = zend_strndup(ZEND_STRS("NCURSES_" #x)); \ c.name_len = sizeof("NCURSES_" #x); \ zend_register_constant(&c TSRMLS_CC)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php