felipe                                   Wed, 30 Jun 2010 02:30:14 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=300869

Log:
- MF5.3: Reverted fix for bug #48930 (due binary compatibility breakage)
# To commit a new common fix

Bug: http://bugs.php.net/48930 (Closed) __COMPILER_HALT_OFFSET__ incorrect in 
PHP>=5.3
      
Changed paths:
    U   php/php-src/trunk/Zend/zend_globals.h
    U   php/php-src/trunk/Zend/zend_language_scanner.c
    U   php/php-src/trunk/Zend/zend_language_scanner.l
    U   php/php-src/trunk/sapi/cgi/cgi_main.c
    U   php/php-src/trunk/sapi/cli/php_cli.c

Modified: php/php-src/trunk/Zend/zend_globals.h
===================================================================
--- php/php-src/trunk/Zend/zend_globals.h       2010-06-30 00:58:26 UTC (rev 
300868)
+++ php/php-src/trunk/Zend/zend_globals.h       2010-06-30 02:30:14 UTC (rev 
300869)
@@ -88,7 +88,6 @@
        char *compiled_filename;

        int zend_lineno;
-       int shebang_len;

        char *heredoc;
        int heredoc_len;

Modified: php/php-src/trunk/Zend/zend_language_scanner.c
===================================================================
--- php/php-src/trunk/Zend/zend_language_scanner.c      2010-06-30 00:58:26 UTC 
(rev 300868)
+++ php/php-src/trunk/Zend/zend_language_scanner.c      2010-06-30 02:30:14 UTC 
(rev 300869)
@@ -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 @@
                CG(start_lineno) = 0;
        } else {
                CG(zend_lineno) = 1;
-               CG(shebang_len) = 0;
        }

        CG(increment_lineno) = 0;
@@ -451,7 +450,7 @@

 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 @@
                ++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;
 }

Modified: php/php-src/trunk/Zend/zend_language_scanner.l
===================================================================
--- php/php-src/trunk/Zend/zend_language_scanner.l      2010-06-30 00:58:26 UTC 
(rev 300868)
+++ php/php-src/trunk/Zend/zend_language_scanner.l      2010-06-30 02:30:14 UTC 
(rev 300869)
@@ -299,7 +299,6 @@
                CG(start_lineno) = 0;
        } else {
                CG(zend_lineno) = 1;
-               CG(shebang_len) = 0;
        }

        CG(increment_lineno) = 0;
@@ -449,7 +448,7 @@

 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 {

Modified: php/php-src/trunk/sapi/cgi/cgi_main.c
===================================================================
--- php/php-src/trunk/sapi/cgi/cgi_main.c       2010-06-30 00:58:26 UTC (rev 
300868)
+++ php/php-src/trunk/sapi/cgi/cgi_main.c       2010-06-30 02:30:14 UTC (rev 
300869)
@@ -2079,7 +2079,6 @@
                                }
                        }

-                       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 @@
                                                        
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);

Modified: php/php-src/trunk/sapi/cli/php_cli.c
===================================================================
--- php/php-src/trunk/sapi/cli/php_cli.c        2010-06-30 00:58:26 UTC (rev 
300868)
+++ php/php-src/trunk/sapi/cli/php_cli.c        2010-06-30 02:30:14 UTC (rev 
300869)
@@ -652,7 +652,6 @@
                                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 @@
                        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 @@
                                                        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;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to