cvs: php4 /ext/dba dba.c dba_db2.c dba_db3.c php_dba.h

From: Date: Tue, 27 Jun 2000 22:25:27 +0000
Subject: cvs: php4 /ext/dba dba.c dba_db2.c dba_db3.c php_dba.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-520@lists.php.net to get a copy of this message
jah Tue Jun 27 15:25:27 2000 EDT Modified files: /php4/ext/dba dba.c dba_db2.c dba_db3.c php_dba.h Log: # Reverting as requested. Index: php4/ext/dba/dba.c diff -u php4/ext/dba/dba.c:1.18 php4/ext/dba/dba.c:1.19 --- php4/ext/dba/dba.c:1.18 Tue Jun 27 14:36:25 2000 +++ php4/ext/dba/dba.c Tue Jun 27 15:25:27 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba.c,v 1.18 2000/06/27 21:36:25 jah Exp $ */ +/* $Id: dba.c,v 1.19 2000/06/27 22:25:27 jah Exp $ */ #include "php.h" @@ -191,9 +191,6 @@ zend_hash_init(&ht_keys, 0, NULL, NULL, 1); GLOBAL(le_db) = register_list_destructors(dba_close, NULL); GLOBAL(le_pdb) = register_list_destructors(NULL, dba_close); - REGISTER_LONG_CONSTANT("DBA_BTREE", DBA_BTREE, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("DBA_HASH", DBA_HASH, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("DBA_RECNO", DBA_RECNO, CONST_CS | CONST_PERSISTENT); return SUCCESS; } @@ -209,7 +206,7 @@ dba_handler *hptr; php_info_print_box_start(0); - PUTS("V1 ($Id: dba.c,v 1.18 2000/06/27 21:36:25 jah Exp $)"); + PUTS("V1 ($Id: dba.c,v 1.19 2000/06/27 22:25:27 jah Exp $)"); for(hptr = handler; hptr->name; hptr++) { PUTS(" "); PUTS(hptr->name); Index: php4/ext/dba/dba_db2.c diff -u php4/ext/dba/dba_db2.c:1.7 php4/ext/dba/dba_db2.c:1.8 --- php4/ext/dba/dba_db2.c:1.7 Tue Jun 27 14:36:25 2000 +++ php4/ext/dba/dba_db2.c Tue Jun 27 15:25:27 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db2.c,v 1.7 2000/06/27 21:36:25 jah Exp $ */ +/* $Id: dba_db2.c,v 1.8 2000/06/27 22:25:27 jah Exp $ */ #include "php.h" @@ -74,21 +74,6 @@ if(info->argc > 0) { convert_to_long_ex(info->argv[0]); filemode = (*info->argv[0])->value.lval; - } - - if(info->argc > 1 - && ((info->mode == DBA_CREAT && type != DB_UNKNOWN) - || info->mode == DBA_TRUNC)) { - convert_to_long_ex(info->argv[1]); - switch ((*info->argv[1])->value.lval) { - case DBA_HASH: - type = DB_HASH; - break; - case DBA_BTREE: - default: - type = DB_BTREE; - break; - } } if(!db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) { Index: php4/ext/dba/dba_db3.c diff -u php4/ext/dba/dba_db3.c:1.5 php4/ext/dba/dba_db3.c:1.6 --- php4/ext/dba/dba_db3.c:1.5 Tue Jun 27 14:36:26 2000 +++ php4/ext/dba/dba_db3.c Tue Jun 27 15:25:27 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db3.c,v 1.5 2000/06/27 21:36:26 jah Exp $ */ +/* $Id: dba_db3.c,v 1.6 2000/06/27 22:25:27 jah Exp $ */ #include "php.h" @@ -74,21 +74,6 @@ if (info->argc > 0) { convert_to_long_ex(info->argv[0]); filemode = (*info->argv[0])->value.lval; - } - - if(info->argc > 1 - && ((info->mode == DBA_CREAT && type != DB_UNKNOWN) - || info->mode == DBA_TRUNC)) { - convert_to_long_ex(info->argv[1]); - switch ((*info->argv[1])->value.lval) { - case DBA_HASH: - type = DB_HASH; - break; - case DBA_BTREE: - default: - type = DB_BTREE; - break; - } } if (db_create(&dbp, NULL, 0) == 0 && Index: php4/ext/dba/php_dba.h diff -u php4/ext/dba/php_dba.h:1.3 php4/ext/dba/php_dba.h:1.4 --- php4/ext/dba/php_dba.h:1.3 Tue Jun 27 14:36:26 2000 +++ php4/ext/dba/php_dba.h Tue Jun 27 15:25:27 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dba.h,v 1.3 2000/06/27 21:36:26 jah Exp $ */ +/* $Id: php_dba.h,v 1.4 2000/06/27 22:25:27 jah Exp $ */ #ifndef _DBA_H #define _DBA_H @@ -40,12 +40,6 @@ DBA_TRUNC, DBA_CREAT } dba_mode_t; - -typedef enum { - DBA_BTREE = 1, - DBA_HASH, - DBA_RECNO -} dba_type_t; typedef struct dba_info { /* public */

« previous php.cvs (#520) next »