1
<!--$Id: func.so,v 11.9 2001/03/01 15:58:20 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB Reference Guide: Release 3.0: function arguments</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<table width="100%"><tr valign=top>
12
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></h3></td>
13
<td align=right><a href="../../ref/upgrade.3.0/envopen.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/upgrade.3.0/dbenv.html"><img src="../../images/next.gif" alt="Next"></a>
16
<h1 align=center>Release 3.0: function arguments</h1>
17
<p>In Berkeley DB 3.0, there are no longer separate structures that represent
18
each subsystem (for example, DB_LOCKTAB or DB_TXNMGR), and an overall
19
DB_ENV environment structure. Instead there is only the
20
DB_ENV structure. This means that DB_ENV references
21
should be passed around by your application instead of passing around
22
DB_LOCKTAB or DB_TXNMGR references.
23
<p>Each of the following functions:
24
<p><blockquote><pre>lock_detect
29
lock_vec</pre></blockquote>
30
<p>should have its first argument, a reference to the DB_LOCKTAB structure,
31
replaced with a reference to the enclosing DB_ENV structure. For
32
example, the following line of code from a Berkeley DB 2.X application:
33
<p><blockquote><pre>DB_LOCKTAB *lt;
35
ret = lock_put(lt, lock);</pre></blockquote>
36
<p>should now be written as follows:
37
<p><blockquote><pre>DB_ENV *dbenv;
39
ret = lock_put(dbenv, lock);</pre></blockquote>
40
<p>Similarly, all of the functions:
41
<p><blockquote><pre>log_archive
49
log_unregister</pre></blockquote>
50
<p>should have their DB_LOG argument replaced with a reference to a
51
DB_ENV structure, and the functions:
52
<p><blockquote><pre>memp_fopen
56
memp_trickle</pre></blockquote>
57
<p>should have their DB_MPOOL argument replaced with a reference to a
59
<p>You should remove all references to DB_LOCKTAB, DB_LOG, DB_MPOOL, and
60
DB_TXNMGR structures from your application, they are no longer useful
61
in any way. In fact, a simple way to identify all of the places that
62
need to be upgraded is to remove all such structures and variables
63
they declare, and then compile. You will see a warning message from
64
your compiler in each case that needs to be upgraded.
65
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/upgrade.3.0/envopen.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/upgrade.3.0/dbenv.html"><img src="../../images/next.gif" alt="Next"></a>
67
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>