cvs: ZendEngine2 / zend_API.c

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

  Modified files:              
    /ZendEngine2	zend_API.c 
  Log:
  cleanup
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.491&r2=1.492&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.491 ZendEngine2/zend_API.c:1.492
--- ZendEngine2/zend_API.c:1.491	Mon Nov 24 19:17:24 2008
+++ ZendEngine2/zend_API.c	Tue Nov 25 22:23:28 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.c,v 1.491 2008/11/24 19:17:24 stas Exp $ */
+/* $Id: zend_API.c,v 1.492 2008/11/25 22:23:28 stas Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -319,7 +319,7 @@
 {
 	char *spec_walk = *spec;
 	char c = *spec_walk++;
-	int return_null = 0, obj_array = 0;
+	int return_null = 0;
 	int alternate_form = 0;
 	int return_orig_type = 0;
 	zend_uchar orig_type;
@@ -687,7 +687,6 @@
 			}
 			break;
 		case 'A':
-				obj_array = 1;
 		case 'a':
 			{
 				zval **p = va_arg(*va, zval **);
@@ -695,7 +694,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";
@@ -703,7 +702,6 @@
 			}
 			break;
 		case 'H':
-				obj_array = 1;
 		case 'h':
 			{
 				HashTable **p = va_arg(*va, HashTable **);
@@ -713,7 +711,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.