--- embedaddon/php/ext/standard/url_scanner_ex.c 2012/02/21 23:48:02 1.1.1.1 +++ embedaddon/php/ext/standard/url_scanner_ex.c 2012/05/29 12:34:43 1.1.1.2 @@ -1,7 +1,7 @@ -/* Generated by re2c 0.13.5 on Fri Dec 31 23:52:51 2010 */ +/* Generated by re2c 0.13.5 on Mon May 23 12:29:55 2011 */ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 6 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.c,v 1.1.1.1 2012/02/21 23:48:02 misho Exp $ */ +/* $Id: url_scanner_ex.c,v 1.1.1.2 2012/05/29 12:34:43 misho Exp $ */ #include "php.h" @@ -300,7 +300,7 @@ static void handle_form(STD_PARA) static inline void handle_tag(STD_PARA) { int ok = 0; - int i; + unsigned int i; ctx->tag.len = 0; smart_str_appendl(&ctx->tag, start, YYCURSOR - start); @@ -940,7 +940,7 @@ static void php_url_scanner_output_handler(char *outpu size_t len; if (BG(url_adapt_state_ex).url_app.len != 0) { - *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC); + *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT | PHP_OUTPUT_HANDLER_FLUSH | PHP_OUTPUT_HANDLER_FINAL) ? 1 : 0) TSRMLS_CC); if (sizeof(uint) < sizeof(size_t)) { if (len > UINT_MAX) len = UINT_MAX; @@ -959,7 +959,7 @@ static void php_url_scanner_output_handler(char *outpu ctx->result.len = 0; smart_str_free(&ctx->buf); } else { - *handled_output = NULL; + *handled_output = estrndup(output, *handled_output_len = output_len); } } else { *handled_output = NULL; @@ -974,7 +974,7 @@ PHPAPI int php_url_scanner_add_var(char *name, int nam if (! BG(url_adapt_state_ex).active) { php_url_scanner_ex_activate(TSRMLS_C); - php_ob_set_internal_handler(php_url_scanner_output_handler, 0, "URL-Rewriter", 1 TSRMLS_CC); + php_output_start_internal(ZEND_STRL("URL-Rewriter"), php_url_scanner_output_handler, 0, PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC); BG(url_adapt_state_ex).active = 1; }