summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-06-30 02:30:14 +0000
committerFelipe Pena <felipe@php.net>2010-06-30 02:30:14 +0000
commitf2419953d98df1bc5537a057825eabd1d07535ac (patch)
tree701efc76ebfdd0454c6f4b00d0fca7db80bd360f
parent930090b46b5173a7a0ea829459a102e76b22cd9d (diff)
downloadphp-git-f2419953d98df1bc5537a057825eabd1d07535ac.tar.gz
- MF5.3: Reverted fix for bug #48930 (due binary compatibility breakage)
# To commit a new common fix
-rw-r--r--Zend/zend_globals.h1
-rw-r--r--Zend/zend_language_scanner.c7
-rw-r--r--Zend/zend_language_scanner.l3
-rw-r--r--sapi/cgi/cgi_main.c2
-rw-r--r--sapi/cli/php_cli.c3
5 files changed, 4 insertions, 12 deletions
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index 8c3a63bcb7..f8bc38c20d 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -88,7 +88,6 @@ struct _zend_compiler_globals {
char *compiled_filename;
int zend_lineno;
- int shebang_len;
char *heredoc;
int heredoc_len;
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 79054758e6..7396e4c7be 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon May 24 14:07:57 2010 */
+/* Generated by re2c 0.13.5 on Tue Jun 29 22:47:47 2010 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -301,7 +301,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
CG(start_lineno) = 0;
} else {
CG(zend_lineno) = 1;
- CG(shebang_len) = 0;
}
CG(increment_lineno) = 0;
@@ -451,7 +450,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
{
- size_t offset = (SCNG(yy_cursor) - SCNG(yy_start)) + CG(shebang_len);
+ size_t offset = SCNG(yy_cursor) - SCNG(yy_start);
#ifdef ZEND_MULTIBYTE
if (SCNG(input_filter)) {
size_t original_offset = offset, length = 0; do {
@@ -3515,7 +3514,7 @@ yy245:
++YYCURSOR;
YYDEBUG(246, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1292 "Zend/zend_language_scanner.l"
+#line 1291 "Zend/zend_language_scanner.l"
{
return T_SR_EQUAL;
}
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index eadc34d6ee..6622cb3db6 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -299,7 +299,6 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
CG(start_lineno) = 0;
} else {
CG(zend_lineno) = 1;
- CG(shebang_len) = 0;
}
CG(increment_lineno) = 0;
@@ -449,7 +448,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
{
- size_t offset = (SCNG(yy_cursor) - SCNG(yy_start)) + CG(shebang_len);
+ size_t offset = SCNG(yy_cursor) - SCNG(yy_start);
#ifdef ZEND_MULTIBYTE
if (SCNG(input_filter)) {
size_t original_offset = offset, length = 0; do {
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index ab6e5edff7..4b47c41484 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -2079,7 +2079,6 @@ consult the installation file that came with this distribution, or visit \n\
}
}
- CG(shebang_len) = 0;
if (CGIG(check_shebang_line) && file_handle.handle.fp && (file_handle.handle.fp != stdin)) {
/* #!php support */
c = fgetc(file_handle.handle.fp);
@@ -2094,7 +2093,6 @@ consult the installation file that came with this distribution, or visit \n\
fseek(file_handle.handle.fp, pos - 1, SEEK_SET);
}
}
- CG(shebang_len) = ftell(file_handle.handle.fp);
CG(start_lineno) = 2;
} else {
rewind(file_handle.handle.fp);
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index cde66d1e15..8856bf8e6c 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -652,7 +652,6 @@ static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file,
fseek(file_handle->handle.fp, pos - 1, SEEK_SET);
}
}
- CG(shebang_len) = ftell(file_handle->handle.fp);
*lineno = 2;
} else {
rewind(file_handle->handle.fp);
@@ -1088,7 +1087,6 @@ int main(int argc, char *argv[])
script_file=argv[php_optind];
php_optind++;
}
- CG(shebang_len) = 0;
if (script_file) {
if (cli_seek_file_begin(&file_handle, script_file, &lineno TSRMLS_CC) != SUCCESS) {
goto err;
@@ -1328,7 +1326,6 @@ int main(int argc, char *argv[])
exit_status=254;
}
} else {
- CG(shebang_len) = 0;
if (script_file) {
if (cli_seek_file_begin(&file_handle, script_file, &lineno TSRMLS_CC) != SUCCESS) {
exit_status = 1;