Skip to content

Commit f241995

Browse files
committed
- MF5.3: Reverted fix for bug #48930 (due binary compatibility breakage)
# To commit a new common fix
1 parent 930090b commit f241995

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

Zend/zend_globals.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ struct _zend_compiler_globals {
8888
char *compiled_filename;
8989

9090
int zend_lineno;
91-
int shebang_len;
9291

9392
char *heredoc;
9493
int heredoc_len;

Zend/zend_language_scanner.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Generated by re2c 0.13.5 on Mon May 24 14:07:57 2010 */
1+
/* Generated by re2c 0.13.5 on Tue Jun 29 22:47:47 2010 */
22
#line 1 "Zend/zend_language_scanner.l"
33
/*
44
+----------------------------------------------------------------------+
@@ -301,7 +301,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
301301
CG(start_lineno) = 0;
302302
} else {
303303
CG(zend_lineno) = 1;
304-
CG(shebang_len) = 0;
305304
}
306305

307306
CG(increment_lineno) = 0;
@@ -451,7 +450,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
451450

452451
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
453452
{
454-
size_t offset = (SCNG(yy_cursor) - SCNG(yy_start)) + CG(shebang_len);
453+
size_t offset = SCNG(yy_cursor) - SCNG(yy_start);
455454
#ifdef ZEND_MULTIBYTE
456455
if (SCNG(input_filter)) {
457456
size_t original_offset = offset, length = 0; do {
@@ -3515,7 +3514,7 @@ int lex_scan(zval *zendlval TSRMLS_DC)
35153514
++YYCURSOR;
35163515
YYDEBUG(246, *YYCURSOR);
35173516
yyleng = YYCURSOR - SCNG(yy_text);
3518-
#line 1292 "Zend/zend_language_scanner.l"
3517+
#line 1291 "Zend/zend_language_scanner.l"
35193518
{
35203519
return T_SR_EQUAL;
35213520
}

Zend/zend_language_scanner.l

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
299299
CG(start_lineno) = 0;
300300
} else {
301301
CG(zend_lineno) = 1;
302-
CG(shebang_len) = 0;
303302
}
304303

305304
CG(increment_lineno) = 0;
@@ -449,7 +448,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
449448

450449
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
451450
{
452-
size_t offset = (SCNG(yy_cursor) - SCNG(yy_start)) + CG(shebang_len);
451+
size_t offset = SCNG(yy_cursor) - SCNG(yy_start);
453452
#ifdef ZEND_MULTIBYTE
454453
if (SCNG(input_filter)) {
455454
size_t original_offset = offset, length = 0; do {

sapi/cgi/cgi_main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,7 +2079,6 @@ consult the installation file that came with this distribution, or visit \n\
20792079
}
20802080
}
20812081

2082-
CG(shebang_len) = 0;
20832082
if (CGIG(check_shebang_line) && file_handle.handle.fp && (file_handle.handle.fp != stdin)) {
20842083
/* #!php support */
20852084
c = fgetc(file_handle.handle.fp);
@@ -2094,7 +2093,6 @@ consult the installation file that came with this distribution, or visit \n\
20942093
fseek(file_handle.handle.fp, pos - 1, SEEK_SET);
20952094
}
20962095
}
2097-
CG(shebang_len) = ftell(file_handle.handle.fp);
20982096
CG(start_lineno) = 2;
20992097
} else {
21002098
rewind(file_handle.handle.fp);

sapi/cli/php_cli.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@ static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file,
652652
fseek(file_handle->handle.fp, pos - 1, SEEK_SET);
653653
}
654654
}
655-
CG(shebang_len) = ftell(file_handle->handle.fp);
656655
*lineno = 2;
657656
} else {
658657
rewind(file_handle->handle.fp);
@@ -1088,7 +1087,6 @@ int main(int argc, char *argv[])
10881087
script_file=argv[php_optind];
10891088
php_optind++;
10901089
}
1091-
CG(shebang_len) = 0;
10921090
if (script_file) {
10931091
if (cli_seek_file_begin(&file_handle, script_file, &lineno TSRMLS_CC) != SUCCESS) {
10941092
goto err;
@@ -1328,7 +1326,6 @@ int main(int argc, char *argv[])
13281326
exit_status=254;
13291327
}
13301328
} else {
1331-
CG(shebang_len) = 0;
13321329
if (script_file) {
13331330
if (cli_seek_file_begin(&file_handle, script_file, &lineno TSRMLS_CC) != SUCCESS) {
13341331
exit_status = 1;

0 commit comments

Comments
 (0)