summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2000-10-20 18:25:16 +0000
committerAndrei Zmievski <andrei@php.net>2000-10-20 18:25:16 +0000
commit7b4983c8f82c4f361df787f58c6f5cf88d5def0b (patch)
treee38e8ffceb65a0f2492b28e2b07c8668fcddeda4 /ext/zlib
parenta0cfab65ea72963f81a3440a3587d11bd7800337 (diff)
downloadphp-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/zlib')
-rw-r--r--ext/zlib/zlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 5c34a0ed37..e9e934d120 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -127,7 +127,9 @@ zend_module_entry php_zlib_module_entry = {
ZEND_GET_MODULE(php_zlib)
#endif
-static void phpi_destructor_gzclose(gzFile *zp) {
+static void phpi_destructor_gzclose(zend_rsrc_list_entry *rsrc)
+{
+ gzFile *zp = (gzFile *)rsrc->ptr;
(void)gzclose(zp);
}
@@ -147,7 +149,7 @@ PHP_MINIT_FUNCTION(zlib)
#else
ZLIBG(gzgetss_state)=0;
#endif
- le_zp = register_list_destructors(phpi_destructor_gzclose,NULL);
+ le_zp = register_list_destructors(phpi_destructor_gzclose,NULL,"zlib");
#if HAVE_FOPENCOOKIE