summaryrefslogtreecommitdiff
path: root/ext/ncurses
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-12-12 00:23:15 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-12-12 00:23:15 +0000
commitf341b2f3815afe06524cf1c33b41fba8922a382f (patch)
tree62d8431e2e4edf4cb41a86ad6f0e888cf3248df1 /ext/ncurses
parent7f9d1a1f6ba447996ed434d733215da7c1d20631 (diff)
downloadphp-git-f341b2f3815afe06524cf1c33b41fba8922a382f.tar.gz
Fixed extra byte allocation in constant creation code.
Diffstat (limited to 'ext/ncurses')
-rw-r--r--ext/ncurses/ncurses_functions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c
index 1bdd3de23a..cd0d716dbc 100644
--- a/ext/ncurses/ncurses_functions.c
+++ b/ext/ncurses/ncurses_functions.c
@@ -149,8 +149,8 @@ PHP_FUNCTION(ncurses_init)
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 @@ PHP_FUNCTION(ncurses_init)
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)