Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MFZE1 - lineno fix

  • Loading branch information...
commit cf05f34c660526ea202c76e5f7563107d1a15266 1 parent b5d97e5
@zsuraski zsuraski authored
View
1  Zend/zend_compile.c
@@ -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
1  Zend/zend_globals.h
@@ -119,6 +119,7 @@ struct _zend_compiler_globals {
int interactive;
+ zend_uint start_lineno;
zend_bool in_clone_method;
zend_bool increment_lineno;
View
5 Zend/zend_language_scanner.l
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.