cvs: ZendEngine2(PHP_5_3) / zend_API.h zend_builtin_functions.c zend_exceptions.c
[email protected] ("Felipe Pena")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsfelipe1205186562@cvsserver> |
felipe Mon Mar 10 22:02:42 2008 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_API.h zend_builtin_functions.c zend_exceptions.c
Log:
MFH: Added new macro for check void parameters.
(deprecating ZEND_WRONG_PARAM_COUNT for this cases)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.h?r1=1.207.2.8.2.8.2.8&r2=1.207.2.8.2.8.2.9&diff_format=u
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.207.2.8.2.8.2.8 ZendEngine2/zend_API.h:1.207.2.8.2.8.2.9
--- ZendEngine2/zend_API.h:1.207.2.8.2.8.2.8 Fri Feb 1 21:27:55 2008
+++ ZendEngine2/zend_API.h Mon Mar 10 22:02:41 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.h,v 1.207.2.8.2.8.2.8 2008/02/01 21:27:55 helly Exp $ */
+/* $Id: zend_API.h,v 1.207.2.8.2.8.2.9 2008/03/10 22:02:41 felipe Exp $ */
#ifndef ZEND_API_H
#define ZEND_API_H
@@ -189,7 +189,8 @@
_zend_get_parameters_array(ht, param_count, argument_array TSRMLS_CC)
#define zend_get_parameters_array_ex(param_count, argument_array) \
_zend_get_parameters_array_ex(param_count, argument_array TSRMLS_CC)
-
+#define zend_parse_parameters_none() \
+ zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")
/* Parameter parsing API -- andrei */
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.25.2.13&r2=1.277.2.12.2.25.2.14&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.13 ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.14
--- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.13 Sat Feb 23 17:06:19 2008
+++ ZendEngine2/zend_builtin_functions.c Mon Mar 10 22:02:41 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.13 2008/02/23 17:06:19 helly Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.14 2008/03/10 22:02:41 felipe Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -1182,8 +1182,8 @@
ZEND_FUNCTION(get_included_files)
{
char *entry;
- if (ZEND_NUM_ARGS() != 0) {
- ZEND_WRONG_PARAM_COUNT();
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
}
array_init(return_value);
@@ -1394,8 +1394,8 @@
zend_uint mask = ZEND_ACC_INTERFACE;
zend_uint comply = 0;
- if (ZEND_NUM_ARGS() != 0) {
- ZEND_WRONG_PARAM_COUNT();
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
}
array_init(return_value);
@@ -1410,8 +1410,8 @@
zend_uint mask = ZEND_ACC_INTERFACE;
zend_uint comply = 1;
- if (ZEND_NUM_ARGS() != 0) {
- ZEND_WRONG_PARAM_COUNT();
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
}
array_init(return_value);
@@ -1446,8 +1446,8 @@
zval *internal;
zval *user;
- if (ZEND_NUM_ARGS() != 0) {
- ZEND_WRONG_PARAM_COUNT();
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
}
MAKE_STD_ZVAL(internal);
@@ -1763,8 +1763,8 @@
zval *arg_array = NULL;
int indent = 0;
- if (ZEND_NUM_ARGS()) {
- ZEND_WRONG_PARAM_COUNT();
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
}
ptr = EG(current_execute_data);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_exceptions.c?r1=1.79.2.6.2.9.2.4&r2=1.79.2.6.2.9.2.5&diff_format=u
Index: ZendEngine2/zend_exceptions.c
diff -u ZendEngine2/zend_exceptions.c:1.79.2.6.2.9.2.4 ZendEngine2/zend_exceptions.c:1.79.2.6.2.9.2.5
--- ZendEngine2/zend_exceptions.c:1.79.2.6.2.9.2.4 Mon Jan 21 19:39:55 2008
+++ ZendEngine2/zend_exceptions.c Mon Mar 10 22:02:41 2008
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_exceptions.c,v 1.79.2.6.2.9.2.4 2008/01/21 19:39:55 dmitry Exp $ */
+/* $Id: zend_exceptions.c,v 1.79.2.6.2.9.2.5 2008/03/10 22:02:41 felipe Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -182,8 +182,8 @@
/* }}} */
#define DEFAULT_0_PARAMS \
- if (ZEND_NUM_ARGS() > 0) { \
- ZEND_WRONG_PARAM_COUNT(); \
+ if (zend_parse_parameters_none() == FAILURE) { \
+ return; \
}
static void _default_exception_get_entry(zval *object, char *name, int name_len, zval *return_value TSRMLS_DC) /* {{{ */