Skip to content

Commit 8b8f191

Browse files
author
Jouni Ahto
committed
# Reverting as requested.
1 parent 2fdd934 commit 8b8f191

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

ext/dba/dba.c

-3
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@ static PHP_MINIT_FUNCTION(dba)
191191
zend_hash_init(&ht_keys, 0, NULL, NULL, 1);
192192
GLOBAL(le_db) = register_list_destructors(dba_close, NULL);
193193
GLOBAL(le_pdb) = register_list_destructors(NULL, dba_close);
194-
REGISTER_LONG_CONSTANT("DBA_BTREE", DBA_BTREE, CONST_CS | CONST_PERSISTENT);
195-
REGISTER_LONG_CONSTANT("DBA_HASH", DBA_HASH, CONST_CS | CONST_PERSISTENT);
196-
REGISTER_LONG_CONSTANT("DBA_RECNO", DBA_RECNO, CONST_CS | CONST_PERSISTENT);
197194
return SUCCESS;
198195
}
199196

ext/dba/dba_db2.c

-15
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,6 @@ DBA_OPEN_FUNC(db2)
7676
filemode = (*info->argv[0])->value.lval;
7777
}
7878

79-
if(info->argc > 1
80-
&& ((info->mode == DBA_CREAT && type != DB_UNKNOWN)
81-
|| info->mode == DBA_TRUNC)) {
82-
convert_to_long_ex(info->argv[1]);
83-
switch ((*info->argv[1])->value.lval) {
84-
case DBA_HASH:
85-
type = DB_HASH;
86-
break;
87-
case DBA_BTREE:
88-
default:
89-
type = DB_BTREE;
90-
break;
91-
}
92-
}
93-
9479
if(!db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) {
9580
info->dbf = malloc(sizeof(dba_db2_data));
9681
memset(info->dbf, 0, sizeof(dba_db2_data));

ext/dba/dba_db3.c

-15
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,6 @@ DBA_OPEN_FUNC(db3)
7676
filemode = (*info->argv[0])->value.lval;
7777
}
7878

79-
if(info->argc > 1
80-
&& ((info->mode == DBA_CREAT && type != DB_UNKNOWN)
81-
|| info->mode == DBA_TRUNC)) {
82-
convert_to_long_ex(info->argv[1]);
83-
switch ((*info->argv[1])->value.lval) {
84-
case DBA_HASH:
85-
type = DB_HASH;
86-
break;
87-
case DBA_BTREE:
88-
default:
89-
type = DB_BTREE;
90-
break;
91-
}
92-
}
93-
9479
if (db_create(&dbp, NULL, 0) == 0 &&
9580
dbp->open(dbp, info->path, NULL, type, gmode, filemode) == 0) {
9681
dba_db3_data *data;

ext/dba/php_dba.h

-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ typedef enum {
4141
DBA_CREAT
4242
} dba_mode_t;
4343

44-
typedef enum {
45-
DBA_BTREE = 1,
46-
DBA_HASH,
47-
DBA_RECNO
48-
} dba_type_t;
49-
5044
typedef struct dba_info {
5145
/* public */
5246
void *dbf; /* ptr to private data or whatever */

0 commit comments

Comments
 (0)