cvs: ZendEngine2(PHP_5_1) / zend_arg_defs.c zend_modules.h php-src/ext/pcre TODO php_pcre.c
| From: | Andrei Zmievski | Date: | Thu, 06 Apr 2006 21:10:45 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_1) / zend_arg_defs.c zend_modules.h php-src/ext/pcre TODO php_pcre.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4794@lists.php.net to get a copy of this message | ||
andrei Thu Apr 6 21:10:45 2006 UTC
Added files: (Branch: PHP_5_1)
/php-src/ext/pcre TODO
Modified files:
/php-src/ext/pcre php_pcre.c
/ZendEngine2 zend_arg_defs.c zend_modules.h
Log:
Fix a bug that would not fill in the fifth argument to preg_replace()
properly, if the variable was not declared previously.
http://cvs.php.net/viewcvs.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.7&r2=1.168.2.8&diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.7 php-src/ext/pcre/php_pcre.c:1.168.2.8
--- php-src/ext/pcre/php_pcre.c:1.168.2.7 Fri Feb 17 21:18:09 2006
+++ php-src/ext/pcre/php_pcre.c Thu Apr 6 21:10:45 2006
@@ -16,14 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.168.2.7 2006/02/17 21:18:09 andrei Exp $ */
-
-/*
- * TODO
- *
- * - Allow NULL for $matches argument (helps when using preg_match only for
- * match condition)
- */
+/* $Id: php_pcre.c,v 1.168.2.8 2006/04/06 21:10:45 andrei Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1622,8 +1615,8 @@
zend_function_entry pcre_functions[] = {
PHP_FE(preg_match, third_arg_force_ref)
PHP_FE(preg_match_all, third_arg_force_ref)
- PHP_FE(preg_replace, NULL)
- PHP_FE(preg_replace_callback, NULL)
+ PHP_FE(preg_replace, fifth_arg_force_ref)
+ PHP_FE(preg_replace_callback, fifth_arg_force_ref)
PHP_FE(preg_split, NULL)
PHP_FE(preg_quote, NULL)
PHP_FE(preg_grep, NULL)
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_arg_defs.c?r1=1.2.2.1&r2=1.2.2.2&diff_format=u
Index: ZendEngine2/zend_arg_defs.c
diff -u ZendEngine2/zend_arg_defs.c:1.2.2.1 ZendEngine2/zend_arg_defs.c:1.2.2.2
--- ZendEngine2/zend_arg_defs.c:1.2.2.1 Wed Jan 4 23:53:04 2006
+++ ZendEngine2/zend_arg_defs.c Thu Apr 6 21:10:45 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_arg_defs.c,v 1.2.2.1 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_arg_defs.c,v 1.2.2.2 2006/04/06 21:10:45 andrei Exp $ */
ZEND_BEGIN_ARG_INFO(first_arg_force_ref, 0)
ZEND_ARG_PASS_INFO(1)
@@ -40,6 +40,14 @@
ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();
+ZEND_BEGIN_ARG_INFO(fifth_arg_force_ref, 0)
+ ZEND_ARG_PASS_INFO(0)
+ ZEND_ARG_PASS_INFO(0)
+ ZEND_ARG_PASS_INFO(0)
+ ZEND_ARG_PASS_INFO(0)
+ ZEND_ARG_PASS_INFO(1)
+ZEND_END_ARG_INFO();
+
ZEND_BEGIN_ARG_INFO(all_args_by_ref, 1)
ZEND_END_ARG_INFO();
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_modules.h?r1=1.67.2.2&r2=1.67.2.3&diff_format=u
Index: ZendEngine2/zend_modules.h
diff -u ZendEngine2/zend_modules.h:1.67.2.2 ZendEngine2/zend_modules.h:1.67.2.3
--- ZendEngine2/zend_modules.h:1.67.2.2 Wed Jan 4 23:53:04 2006
+++ ZendEngine2/zend_modules.h Thu Apr 6 21:10:45 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_modules.h,v 1.67.2.2 2006/01/04 23:53:04 andi Exp $ */
+/* $Id: zend_modules.h,v 1.67.2.3 2006/04/06 21:10:45 andrei Exp $ */
#ifndef MODULES_H
#define MODULES_H
@@ -36,6 +36,7 @@
extern struct _zend_arg_info second_arg_force_ref[3];
extern struct _zend_arg_info third_arg_force_ref[4];
extern struct _zend_arg_info fourth_arg_force_ref[5];
+extern struct _zend_arg_info fifth_arg_force_ref[6];
extern struct _zend_arg_info all_args_by_ref[1];
#define ZEND_MODULE_API_NO 20050922