summaryrefslogtreecommitdiff
path: root/ext/odbc/velocis.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/odbc/velocis.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/odbc/velocis.c')
-rw-r--r--ext/odbc/velocis.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/odbc/velocis.c b/ext/odbc/velocis.c
index 03c46d3e33..eaa62164ec 100644
--- a/ext/odbc/velocis.c
+++ b/ext/odbc/velocis.c
@@ -73,15 +73,17 @@ ZEND_GET_MODULE(velocis)
THREAD_LS velocis_module php_velocis_module;
THREAD_LS static HENV henv;
-static void _close_velocis_link(VConn *conn)
+static void _close_velocis_link(zend_rsrc_list_entry *rsrc)
{
+ VConn *conn = (VConn *)rsrc->ptr;
if ( conn ) {
efree(conn);
}
}
-static void _free_velocis_result(Vresult *res)
+static void _free_velocis_result(zend_rsrc_list_entry *rsrc)
{
+ Vresult *res = (Vresult *)rsrc->ptr;
if ( res && res->values ) {
register int i;
for ( i=0; i < res->numcols; i++ ) {
@@ -102,8 +104,8 @@ PHP_MINIT_FUNCTION(velocis)
php_velocis_module.max_links = -1;
}
php_velocis_module.num_links = 0;
- php_velocis_module.le_link = register_list_destructors(_close_velocis_link,NULL);
- php_velocis_module.le_result = register_list_destructors(_free_velocis_result,NULL);
+ php_velocis_module.le_link = register_list_destructors(_close_velocis_link,NULL,"velocis link");
+ php_velocis_module.le_result = register_list_destructors(_free_velocis_result,NULL,"velocis result");
return SUCCESS;
}