From d110aa567d85a5c430e80209b1f75aea5eda2292 Mon Sep 17 00:00:00 2001 From: eknauel Date: Mon, 14 Feb 2005 07:14:36 +0000 Subject: [PATCH] add support for DB_INIT_CDB --- c/bdb.c | 4 +++- scheme/bdb.scm | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/c/bdb.c b/c/bdb.c index 32ff0af..886d5f5 100644 --- a/c/bdb.c +++ b/c/bdb.c @@ -106,6 +106,7 @@ static s48_value scheme_DB_AFTER = S48_FALSE; static s48_value scheme_DB_BEFORE = S48_FALSE; static s48_value scheme_DB_KEYFIRST = S48_FALSE; static s48_value scheme_DB_KEYLAST = S48_FALSE; +static s48_value scheme_DB_INIT_CDB = S48_FALSE; static s48_value scheme_DB_DBT_USERMEM = S48_FALSE; /* initialise DB_TYPES */ @@ -1370,8 +1371,9 @@ void scsh_init_bdb_bindings(void) ENTER_INTEGER_CONSTANT(scheme_DB_BEFORE, DB_BEFORE); ENTER_INTEGER_CONSTANT(scheme_DB_KEYFIRST, DB_KEYFIRST); ENTER_INTEGER_CONSTANT(scheme_DB_KEYLAST, DB_KEYLAST); + ENTER_INTEGER_CONSTANT(scheme_DB_INIT_CDB, DB_INIT_CDB); ENTER_INTEGER_CONSTANT(scheme_DB_DBT_USERMEM, DB_DBT_USERMEM); - + /* return codes */ ENTER_INTEGER_CONSTANT(scheme_DB_DONOTINDEX, DB_DONOTINDEX); ENTER_INTEGER_CONSTANT(scheme_DB_FILEOPEN, DB_FILEOPEN); diff --git a/scheme/bdb.scm b/scheme/bdb.scm index 99a79b9..be9969a 100644 --- a/scheme/bdb.scm +++ b/scheme/bdb.scm @@ -156,7 +156,8 @@ (before (lookup-shared-value "scheme_DB_BEFORE")) (key-first (lookup-shared-value "scheme_DB_KEYFIRST")) (key-last (lookup-shared-value "scheme_DB_KEYLAST")) - (dbt-user-memory (lookup-shared-value "scheme_DB_DBT_USERMEM"))) + (init-cdb (lookup-shared-value "scheme_DB_INIT_CDB")) + (dbt-user-memory (lookup-shared-value "scheme_DB_DBT_USERMEM")))) (define-finite-type lock-mode :lock-mode (id)