diff options
author | Nuno Lopes <nlopess@php.net> | 2006-12-19 15:01:05 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-12-19 15:01:05 +0000 |
commit | 078fda3d6ecf6fd03a36f0100881023ec855f21e (patch) | |
tree | c2d22757b2a6b8fccb231de0a3cfeee8fee4ae8e /ext/json/json.c | |
parent | 2c3db736c4061ff6a11f0b2de4062951e0b1809a (diff) | |
download | php-git-078fda3d6ecf6fd03a36f0100881023ec855f21e.tar.gz |
remove NOP code in json_determine_array_type(), as we already know the zval passed is an array (based on patch by Ron Korving)
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/ext/json/json.c b/ext/json/json.c index e1943df847..84d5aa056c 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -91,14 +91,7 @@ static void json_escape_string(smart_str *buf, char *s, int len); 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) { |