diff options
author | Xinchen Hui <laruence@gmail.com> | 2014-02-17 11:05:48 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2014-02-17 11:05:48 +0800 |
commit | ab2a73a6629850bfd131996a54ca649cfd455f01 (patch) | |
tree | c88aedde358c6af07bd60b044b20a580cdee759b /sapi/phpdbg/phpdbg_help.c | |
parent | ad1838d2483c3a44c77a2d483a5cf27ffeb63e45 (diff) | |
download | php-git-ab2a73a6629850bfd131996a54ca649cfd455f01.tar.gz |
Use better data structures (incomplete)
Diffstat (limited to 'sapi/phpdbg/phpdbg_help.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_help.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index a02cb41c14..93efd4ca64 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -518,15 +518,14 @@ PHPDBG_HELP(register) /* {{{ */ phpdbg_writeln("Note: arguments passed as strings, return (if present) print_r'd on console"); if (zend_hash_num_elements(&PHPDBG_G(registered))) { HashPosition position; - char *name = NULL; - zend_uint name_len = 0; + zend_string *name; phpdbg_notice("Registered Functions (%d)", zend_hash_num_elements(&PHPDBG_G(registered))); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(registered), &position); - zend_hash_get_current_key_ex(&PHPDBG_G(registered), &name, &name_len, NULL, 1, &position) == HASH_KEY_IS_STRING; + zend_hash_get_current_key_ex(&PHPDBG_G(registered), &name, NULL, 1, &position) == HASH_KEY_IS_STRING; zend_hash_move_forward_ex(&PHPDBG_G(registered), &position)) { - phpdbg_writeln("|-------> %s", name); - efree(name); + phpdbg_writeln("|-------> %s", name->val); + STR_RELEASE(name); } } |