From f5951cc81bb777e39dbfffb4db1c265f4e51308f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 23 Mar 2017 22:42:57 +0100 Subject: Fix lineno for AST_ZVAL nodes --- Zend/zend_ast.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Zend/zend_ast.c') diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index b55d0e8a3b..1d4ad3ac8a 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -57,17 +57,21 @@ ZEND_API zend_ast *zend_ast_create_znode(znode *node) { return (zend_ast *) ast; } -ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr) { +ZEND_API zend_ast *zend_ast_create_zval_with_lineno(zval *zv, zend_ast_attr attr, uint32_t lineno) { zend_ast_zval *ast; ast = zend_ast_alloc(sizeof(zend_ast_zval)); ast->kind = ZEND_AST_ZVAL; ast->attr = attr; ZVAL_COPY_VALUE(&ast->val, zv); - ast->val.u2.lineno = CG(zend_lineno); + ast->val.u2.lineno = lineno; return (zend_ast *) ast; } +ZEND_API zend_ast *zend_ast_create_zval_ex(zval *zv, zend_ast_attr attr) { + return zend_ast_create_zval_with_lineno(zv, attr, CG(zend_lineno)); +} + ZEND_API zend_ast *zend_ast_create_decl( zend_ast_kind kind, uint32_t flags, uint32_t start_lineno, zend_string *doc_comment, zend_string *name, zend_ast *child0, zend_ast *child1, zend_ast *child2, zend_ast *child3 -- cgit v1.2.1