cvs: php4 /ext/dba dba.c

From: Date: Thu, 26 Oct 2000 17:38:01 +0000
Subject: cvs: php4 /ext/dba dba.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2264@lists.php.net to get a copy of this message
andrei Thu Oct 26 10:38:01 2000 EDT Modified files: /php4/ext/dba dba.c Log: Fix dba after resources patch. Index: php4/ext/dba/dba.c diff -u php4/ext/dba/dba.c:1.24 php4/ext/dba/dba.c:1.25 --- php4/ext/dba/dba.c:1.24 Wed Oct 25 10:43:49 2000 +++ php4/ext/dba/dba.c Thu Oct 26 10:38:01 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba.c,v 1.24 2000/10/25 17:43:49 andrei Exp $ */ +/* $Id: dba.c,v 1.25 2000/10/26 17:38:01 andrei Exp $ */ #include "php.h" @@ -178,20 +178,25 @@ /* {{{ helper routines */ /* {{{ dba_close */ -static void dba_close(zend_rsrc_list_entry *rsrc) +static void dba_close(dba_info *info) { - dba_info *info = (dba_info *)rsrc->ptr; if(info->hnd) info->hnd->close(info); if(info->path) free(info->path); free(info); } /* }}} */ +static void dba_close_rsrc(zend_rsrc_list_entry *rsrc) +{ + dba_info *info = (dba_info *)rsrc->ptr; + dba_close(info); +} + static PHP_MINIT_FUNCTION(dba) { zend_hash_init(&ht_keys, 0, NULL, NULL, 1); - GLOBAL(le_db) = zend_register_list_destructors_ex(dba_close, NULL, "dba", module_number); - GLOBAL(le_pdb) = zend_register_list_destructors_ex(NULL, dba_close, "dba persistent", module_number); + GLOBAL(le_db) = zend_register_list_destructors_ex(dba_close_rsrc, NULL, "dba", module_number); + GLOBAL(le_pdb) = zend_register_list_destructors_ex(NULL, dba_close_rsrc, "dba persistent", module_number); return SUCCESS; } @@ -207,7 +212,7 @@ dba_handler *hptr; php_info_print_box_start(0); - PUTS("V1 ($Id: dba.c,v 1.24 2000/10/25 17:43:49 andrei Exp $)"); + PUTS("V1 ($Id: dba.c,v 1.25 2000/10/26 17:38:01 andrei Exp $)"); for(hptr = handler; hptr->name; hptr++) { PUTS(" "); PUTS(hptr->name);

« previous php.cvs (#2264) next »