summaryrefslogtreecommitdiff
path: root/ext/mcal/php_mcal.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/mcal/php_mcal.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/mcal/php_mcal.c')
-rw-r--r--ext/mcal/php_mcal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/mcal/php_mcal.c b/ext/mcal/php_mcal.c
index 48ce653ebe..a06cdfc67c 100644
--- a/ext/mcal/php_mcal.c
+++ b/ext/mcal/php_mcal.c
@@ -125,8 +125,9 @@ int le_mcal;
char *mcal_user;
char *mcal_password;
-CALSTREAM *cal_close_it (pils *mcal_le_struct)
+CALSTREAM *cal_close_it (zend_rsrc_list_entry *rsrc)
{
+ pils *mcal_le_struct = (pils *)rsrc->ptr;
CALSTREAM *ret;
ret = cal_close (mcal_le_struct->mcal_stream,0);
efree(mcal_le_struct);
@@ -151,7 +152,7 @@ PHP_MINFO_FUNCTION(mcal)
PHP_MINIT_FUNCTION(mcal)
{
- le_mcal = register_list_destructors(cal_close_it,NULL);
+ le_mcal = register_list_destructors(cal_close_it,NULL,"mcal");
REGISTER_MAIN_LONG_CONSTANT("MCAL_SUNDAY",SUNDAY, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("MCAL_MONDAY",MONDAY, CONST_PERSISTENT | CONST_CS);