cvs: ZendEngine2(PHP_5_3) / zend_API.c

[email protected] ("Stanislav Malyshev")
Newsgroups php.zend-engine.cvs
Message-ID <cvsstas1227651322@cvsserver>
stas		Tue Nov 25 22:15:22 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2	zend_API.c 
  Log:
  cleanup
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.296.2.27.2.34.2.56&r2=1.296.2.27.2.34.2.57&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.296.2.27.2.34.2.56 ZendEngine2/zend_API.c:1.296.2.27.2.34.2.57
--- ZendEngine2/zend_API.c:1.296.2.27.2.34.2.56	Mon Nov 24 18:10:12 2008
+++ ZendEngine2/zend_API.c	Tue Nov 25 22:15:22 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.c,v 1.296.2.27.2.34.2.56 2008/11/24 18:10:12 stas Exp $ */
+/* $Id: zend_API.c,v 1.296.2.27.2.34.2.57 2008/11/25 22:15:22 stas Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -295,7 +295,7 @@
 {
 	char *spec_walk = *spec;
 	char c = *spec_walk++;
-	int return_null = 0, obj_array = 0;
+	int return_null = 0;
 
 	/* scan through modifiers */
 	while (1) {
@@ -452,7 +452,6 @@
 			}
 			break;
 		case 'A':
-				obj_array = 1;
 		case 'a':
 			{
 				zval **p = va_arg(*va, zval **);
@@ -460,7 +459,7 @@
 					*p = NULL;
 					break;
 				}
-				if (Z_TYPE_PP(arg) == IS_ARRAY || (Z_TYPE_PP(arg) == IS_OBJECT && obj_array != 0)) {
+				if (Z_TYPE_PP(arg) == IS_ARRAY || (c == 'A' && Z_TYPE_PP(arg) == IS_OBJECT)) {
 					*p = *arg;
 				} else {
 					return "array";
@@ -468,7 +467,6 @@
 			}
 			break;
 		case 'H':
-				obj_array = 1;
 		case 'h':
 			{
 				HashTable **p = va_arg(*va, HashTable **);
@@ -478,7 +476,7 @@
 				}
 				if (Z_TYPE_PP(arg) == IS_ARRAY) {
 					*p = Z_ARRVAL_PP(arg);
-				} else if(obj_array && Z_TYPE_PP(arg) == IS_OBJECT) {
+				} else if(c == 'H' && Z_TYPE_PP(arg) == IS_OBJECT) {
 					*p = HASH_OF(*arg);
 					if(*p == NULL) {
 						return "array";
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.