nlopess         Tue Dec 19 15:01:57 2006 UTC

  Modified files:              
    /php-src/ext/json   json.c 
  Log:
  MFB: little cleanup in json_determine_array_type()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.19&r2=1.20&diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.19 php-src/ext/json/json.c:1.20
--- php-src/ext/json/json.c:1.19        Thu Oct 19 20:24:25 2006
+++ php-src/ext/json/json.c     Tue Dec 19 15:01:57 2006
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: json.c,v 1.19 2006/10/19 20:24:25 andrei Exp $ */
+/* $Id: json.c,v 1.20 2006/12/19 15:01:57 nlopess Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -84,14 +84,7 @@
 static int json_determine_array_type(zval **val TSRMLS_DC) /* {{{ */
 {
     int i;
-    HashTable *myht;
-
-    if (Z_TYPE_PP(val) == IS_ARRAY) {
-        myht = HASH_OF(*val);
-    } else {
-        myht = Z_OBJPROP_PP(val);
-        return 1;
-    }
+    HashTable *myht = HASH_OF(*val);
 
     i = myht ? zend_hash_num_elements(myht) : 0;
     if (i > 0) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to