diff options
author | Andrei Zmievski <andrei@php.net> | 2000-10-20 18:25:16 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 2000-10-20 18:25:16 +0000 |
commit | 7b4983c8f82c4f361df787f58c6f5cf88d5def0b (patch) | |
tree | e38e8ffceb65a0f2492b28e2b07c8668fcddeda4 /ext/ftp/php_ftp.c | |
parent | a0cfab65ea72963f81a3440a3587d11bd7800337 (diff) | |
download | php-git-7b4983c8f82c4f361df787f58c6f5cf88d5def0b.tar.gz |
Mega-patch to get better resource information for modules.
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
* Switched register_list_destructors() to use
zend_register_list_destructors_ex() instead
* Updated all relevant modules to provide the resource type name
to register_list_destructors() call
* Updated var_dump() to output resource type name instead of number
@- Made resource type names visible, e.g. var_dump() and
@ get_resource_type() display "file" for file resources. (Andrei)
Diffstat (limited to 'ext/ftp/php_ftp.c')
-rw-r--r-- | ext/ftp/php_ftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index a7de40b128..a457aab211 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -84,14 +84,15 @@ zend_module_entry php_ftp_module_entry = { ZEND_GET_MODULE(php_ftp) #endif -static void ftp_destructor_ftpbuf(ftpbuf_t *ftp) +static void ftp_destructor_ftpbuf(zend_rsrc_list_entry *rsrc) { + ftpbuf_t *ftp = (ftpbuf_t *)rsrc->ptr; ftp_close(ftp); } PHP_MINIT_FUNCTION(ftp) { - le_ftpbuf = register_list_destructors(ftp_destructor_ftpbuf, NULL); + le_ftpbuf = register_list_destructors(ftp_destructor_ftpbuf, NULL, "ftp"); REGISTER_MAIN_LONG_CONSTANT("FTP_ASCII", FTPTYPE_ASCII, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("FTP_BINARY", FTPTYPE_IMAGE, |