summaryrefslogtreecommitdiff
path: root/ext/sablot/sablot.c
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/sablot/sablot.c
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/sablot/sablot.c')
-rw-r--r--ext/sablot/sablot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/sablot/sablot.c b/ext/sablot/sablot.c
index 44c72adb70..747efaef53 100644
--- a/ext/sablot/sablot.c
+++ b/ext/sablot/sablot.c
@@ -32,7 +32,7 @@
#include "php_sablot.h"
/* Functions related to PHP's list handling */
-static void _php_sablot_free_processor(php_sablot *);
+static void _php_sablot_free_processor(zend_rsrc_list_entry *rsrc);
/* SAX Handlers */
static void _php_sablot_handler_pair(php_sablot *, zval **, zval **, zval **);
@@ -140,7 +140,7 @@ ZEND_GET_MODULE(sablot)
PHP_MINIT_FUNCTION(sablot)
{
SABLOTLS_FETCH();
- SABLOTG(le_sablot) = register_list_destructors(_php_sablot_free_processor, NULL);
+ SABLOTG(le_sablot) = register_list_destructors(_php_sablot_free_processor, NULL, "sablotron");
return SUCCESS;
}
@@ -1058,8 +1058,9 @@ static MH_ERROR _php_sablot_error(void *userData, SablotHandle p, MH_ERROR code,
/* {{{ _php_sablot_free_processor()
Free a Sablot handle */
-static void _php_sablot_free_processor(php_sablot *handle)
+static void _php_sablot_free_processor(zend_rsrc_list_entry *rsrc)
{
+ php_sablot *handle = (php_sablot *)rsrc->ptr;
if (handle->p) {
SablotUnregHandler(handle->p, HLR_MESSAGE, NULL, NULL);
SablotUnregHandler(handle->p, HLR_SAX, NULL, NULL);