summaryrefslogtreecommitdiff
path: root/Zend/zend_ini_scanner.l
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-04-30 20:28:02 +0200
committerNikita Popov <nikic@php.net>2014-05-01 09:08:29 +0200
commit5a03efe2790cc935d4d8ca723bd21ce8c079fbd4 (patch)
treed378f9fb31ab2bce4f70211df94b4403db55d5ca /Zend/zend_ini_scanner.l
parent257bf697ae9b2ae366f7f3726019c18ad92b9002 (diff)
downloadphp-git-5a03efe2790cc935d4d8ca723bd21ce8c079fbd4.tar.gz
Don't allocate zend_stack elements individually
Instead allocate a vector of elements. Size must now be specified on initialization rather than on push.
Diffstat (limited to 'Zend/zend_ini_scanner.l')
-rw-r--r--Zend/zend_ini_scanner.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l
index 379d86965d..1b3cbd47ea 100644
--- a/Zend/zend_ini_scanner.l
+++ b/Zend/zend_ini_scanner.l
@@ -142,7 +142,7 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
static void _yy_push_state(int new_state TSRMLS_DC)
{
- zend_stack_push(&SCNG(state_stack), (void *) &YYGETCONDITION(), sizeof(int));
+ zend_stack_push(&SCNG(state_stack), (void *) &YYGETCONDITION());
YYSETCONDITION(new_state);
}
@@ -185,7 +185,7 @@ static int init_ini_scanner(int scanner_mode, zend_file_handle *fh TSRMLS_DC)
ini_filename = NULL;
}
- zend_stack_init(&SCNG(state_stack));
+ zend_stack_init(&SCNG(state_stack), sizeof(int));
BEGIN(INITIAL);
return SUCCESS;