diff options
author | Marcus Boerger <helly@php.net> | 2003-09-18 16:20:42 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-09-18 16:20:42 +0000 |
commit | 7b3e84871ead98265cf92edd6f97575e37cdea5f (patch) | |
tree | 63491a33539bac2b32071b6cb2f1503fa500286a /Zend | |
parent | 5b3bb16530379c05be056e88df8692dd7566676b (diff) | |
download | php-git-7b3e84871ead98265cf92edd6f97575e37cdea5f.tar.gz |
Go with studlyCaps
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_builtin_functions.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 93abe83e50..c4330f0539 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -722,6 +722,8 @@ ZEND_FUNCTION(get_class_methods) char *string_key; ulong num_key; int key_type; + HashPosition pos; + zend_function *mptr; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class)==FAILURE) { ZEND_WRONG_PARAM_COUNT(); @@ -747,14 +749,13 @@ ZEND_FUNCTION(get_class_methods) } array_init(return_value); - zend_hash_internal_pointer_reset(&ce->function_table); - while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key, 1)) != HASH_KEY_NON_EXISTANT) { - if (key_type == HASH_KEY_IS_STRING) { - MAKE_STD_ZVAL(method_name); - ZVAL_STRING(method_name, string_key, 0); - zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL); - } - zend_hash_move_forward(&ce->function_table); + zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos); + + while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) { + MAKE_STD_ZVAL(method_name); + ZVAL_STRING(method_name, mptr->common.function_name, 1); + zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL); + zend_hash_move_forward_ex(&ce->function_table, &pos); } } /* }}} */ |