MFZE1 - lineno fix

This commit is contained in:
Zeev Suraski 2003-01-05 16:09:59 +00:00
parent b5d97e5ddb
commit cf05f34c66
3 changed files with 5 additions and 2 deletions

View File

@ -79,6 +79,7 @@ void zend_init_compiler_data_structures(TSRMLS_D)
zend_stack_init(&CG(list_stack));
CG(handle_op_arrays) = 1;
CG(in_compilation) = 0;
CG(start_lineno) = 0;
init_compiler_declarables(TSRMLS_C);
CG(throw_list) = NULL;
zend_register_auto_global("GLOBALS", sizeof("GLOBALS")-1 TSRMLS_CC);

View File

@ -119,6 +119,7 @@ struct _zend_compiler_globals {
int interactive;
zend_uint start_lineno;
zend_bool in_clone_method;
zend_bool increment_lineno;

View File

@ -248,8 +248,9 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
zend_set_compiled_filename(file_path TSRMLS_CC);
if (CG(zend_lineno) < 0) { /* position is (n_lines * -1), position was changed by an external app */
CG(zend_lineno) = CG(zend_lineno) * -1;
if (CG(start_lineno)) {
CG(zend_lineno) = CG(start_lineno);
CG(start_lineno) = 0;
} else {
CG(zend_lineno) = 1;
}