cvs: php-src(PHP_4_3) /ext/pcre php_pcre.c
| From: | Derick Rethans | Date: | Fri, 21 Jan 2005 10:34:47 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /ext/pcre php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30052@lists.php.net to get a copy of this message | ||
derick Fri Jan 21 05:34:47 2005 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/pcre php_pcre.c
Log:
- MFH: php_error_docref() adoption.
http://cvs.php.net/diff.php/php-src/ext/pcre/php_pcre.c?r1=1.132.2.21&r2=1.132.2.22&ty=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.132.2.21 php-src/ext/pcre/php_pcre.c:1.132.2.22
--- php-src/ext/pcre/php_pcre.c:1.132.2.21 Wed Aug 25 16:47:40 2004
+++ php-src/ext/pcre/php_pcre.c Fri Jan 21 05:34:46 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.132.2.21 2004/08/25 20:47:40 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.132.2.22 2005/01/21 10:34:46 derick Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -169,7 +169,7 @@
get to the end without encountering a delimiter. */
while (isspace((int)*(unsigned char *)p)) p++;
if (*p == 0) {
- zend_error(E_WARNING, "Empty regular expression");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty regular expression");
return NULL;
}
@@ -177,7 +177,7 @@
or a backslash. */
delimiter = *p++;
if (isalnum((int)*(unsigned char *)&delimiter) || delimiter == '\\') {
- zend_error(E_WARNING, "Delimiter must not be alphanumeric or backslash");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Delimiter must not be alphanumeric or
backslash");
return NULL;
}
@@ -198,7 +198,7 @@
pp++;
}
if (*pp == 0) {
- zend_error(E_WARNING, "No ending delimiter '%c' found", delimiter);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "No ending delimiter '%c'
found", delimiter);
return NULL;
}
} else {
@@ -218,7 +218,7 @@
pp++;
}
if (*pp == 0) {
- zend_error(E_WARNING, "No ending matching delimiter '%c' found",
end_delimiter);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "No ending matching delimiter '%c'
found", end_delimiter);
return NULL;
}
}
@@ -258,7 +258,7 @@
break;
default:
- zend_error(E_WARNING, "Unknown modifier '%c'", pp[-1]);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown modifier '%c'",
pp[-1]);
efree(pattern);
return NULL;
}
@@ -277,7 +277,7 @@
tables);
if (re == NULL) {
- zend_error(E_WARNING, "Compilation failed: %s at offset %d", error, erroffset);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Compilation failed: %s at offset %d",
error, erroffset);
efree(pattern);
return NULL;
}
@@ -287,7 +287,7 @@
if (do_study) {
*extra = pcre_study(re, soptions, &error);
if (error != NULL) {
- zend_error(E_WARNING, "Error while studying pattern");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while studying pattern");
}
}
@@ -394,7 +394,7 @@
}
if ((global && (subpats_order < PREG_PATTERN_ORDER || subpats_order >
PREG_SET_ORDER)) ||
(!global && subpats_order != 0)) {
- zend_error(E_WARNING, "Wrong value for parameter 4 in call to %s()",
get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong value for parameter 4 in call to
%s()", get_active_function_name(TSRMLS_C));
return;
}
}
@@ -486,7 +486,7 @@
/* Check for too many substrings condition. */
if (count == 0) {
- zend_error(E_NOTICE, "Matched, but too many substrings");
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Matched, but too many substrings");
count = size_offsets/3;
}
@@ -502,7 +502,7 @@
efree(subpat_names);
efree(offsets);
efree(re);
- zend_error(E_WARNING, "Get subpatterns list failed");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Get subpatterns list failed");
return;
}
@@ -773,8 +773,8 @@
/* Run the code */
if (zend_eval_string(code.c, &retval, compiled_string_description TSRMLS_CC) == FAILURE) {
efree(compiled_string_description);
- zend_error(E_ERROR, "Failed evaluating code:\n%s", code.c);
- /* zend_error() does not return in this case */
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Failed evaluating code:\n%s", code.c);
+ /* php_error_docref(NULL TSRMLS_CC, ) does not return in this case */
}
efree(compiled_string_description);
convert_to_string(&retval);
@@ -869,7 +869,7 @@
/* Check for too many substrings condition. */
if (count == 0) {
- zend_error(E_NOTICE, "Matched, but too many substrings");
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Matched, but too many substrings");
count = size_offsets/3;
}
@@ -1273,7 +1273,7 @@
/* Check for too many substrings condition. */
if (count == 0) {
- zend_error(E_NOTICE, "Matched, but too many substrings");
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Matched, but too many substrings");
count = size_offsets/3;
}
@@ -1473,7 +1473,7 @@
}
if (Z_TYPE_PP(input) != IS_ARRAY) {
- zend_error(E_WARNING, "Second argument to preg_grep() should be an array");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument to preg_grep() should be an
array");
return;
}
@@ -1518,7 +1518,7 @@
/* Check for too many substrings condition. */
if (count == 0) {
- zend_error(E_NOTICE, "Matched, but too many substrings");
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Matched, but too many substrings");
count = size_offsets/3;
}