cvs: ZendEngine2 / zend_API.h zend_builtin_functions.c zend_exceptions.c

[email protected] ("Felipe Pena")
Newsgroups php.zend-engine.cvs
Message-ID <cvsfelipe1204205443@cvsserver>
felipe		Thu Feb 28 13:30:43 2008 UTC

  Modified files:              
    /ZendEngine2	zend_API.h zend_builtin_functions.c zend_exceptions.c 
  Log:
  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.297&r2=1.298&diff_format=u
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.297 ZendEngine2/zend_API.h:1.298
--- ZendEngine2/zend_API.h:1.297	Sat Feb  2 15:23:22 2008
+++ ZendEngine2/zend_API.h	Thu Feb 28 13:30:43 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.h,v 1.297 2008/02/02 15:23:22 helly Exp $ */
+/* $Id: zend_API.h,v 1.298 2008/02/28 13:30:43 felipe Exp $ */
 
 #ifndef ZEND_API_H
 #define ZEND_API_H
@@ -194,6 +194,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.367&r2=1.368&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.367 ZendEngine2/zend_builtin_functions.c:1.368
--- ZendEngine2/zend_builtin_functions.c:1.367	Sat Feb 23 17:03:51 2008
+++ ZendEngine2/zend_builtin_functions.c	Thu Feb 28 13:30:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_builtin_functions.c,v 1.367 2008/02/23 17:03:51 helly Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.368 2008/02/28 13:30:43 felipe Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -1188,8 +1188,8 @@
 	unsigned int len;
 	int ustr_len;
 
-	if (ZEND_NUM_ARGS() != 0) {
-		ZEND_WRONG_PARAM_COUNT();
+	if (zend_parse_parameters_none() == FAILURE) {
+		return;
 	}
 
 	array_init(return_value);
@@ -1402,8 +1402,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);
@@ -1418,8 +1418,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);
@@ -1463,8 +1463,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);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_exceptions.c?r1=1.118&r2=1.119&diff_format=u
Index: ZendEngine2/zend_exceptions.c
diff -u ZendEngine2/zend_exceptions.c:1.118 ZendEngine2/zend_exceptions.c:1.119
--- ZendEngine2/zend_exceptions.c:1.118	Mon Jan 21 19:41:41 2008
+++ ZendEngine2/zend_exceptions.c	Thu Feb 28 13:30:43 2008
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_exceptions.c,v 1.118 2008/01/21 19:41:41 dmitry Exp $ */
+/* $Id: zend_exceptions.c,v 1.119 2008/02/28 13:30:43 felipe Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -197,8 +197,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) /* {{{ */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.