SQLite

Check-in [5afc445a0e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Omit declaration for functions that are only used by asserts if asserts aren't being used (NDEBUG). (CVS 5173)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5afc445a0e49def38f198455ffce9266fc8724ad
User & Date: shane 2008-05-29 03:01:24.000
Context
2008-05-29
03:12
Fix an obsolete comment on the OP_Rowid opcode in the VDBE. (CVS 5174) (check-in: 0d55328e68 user: drh tags: trunk)
03:01
Omit declaration for functions that are only used by asserts if asserts aren't being used (NDEBUG). (CVS 5173) (check-in: 5afc445a0e user: shane tags: trunk)
02:57
Unused functions in testfixture.exe with certain defines. (CVS 5172) (check-in: 5e3ff1bb37 user: shane tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.h.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the sqlite B-Tree file
** subsystem.  See comments in the source code for a detailed description
** of what each interface routine does.
**
** @(#) $Id: btree.h,v 1.98 2008/04/26 13:39:47 drh Exp $
*/
#ifndef _BTREE_H_
#define _BTREE_H_

/* TODO: This definition is just included so other modules compile. It
** needs to be revisited.
*/







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the sqlite B-Tree file
** subsystem.  See comments in the source code for a detailed description
** of what each interface routine does.
**
** @(#) $Id: btree.h,v 1.99 2008/05/29 03:01:24 shane Exp $
*/
#ifndef _BTREE_H_
#define _BTREE_H_

/* TODO: This definition is just included so other modules compile. It
** needs to be revisited.
*/
181
182
183
184
185
186
187


188

189
190
191
192


193

194
195
196
197
198
199


200

201
202
203
204


205

206
207
208
209
210
211
212
** If we are not using shared cache, then there is no need to
** use mutexes to access the BtShared structures.  So make the
** Enter and Leave procedures no-ops.
*/
#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE
  void sqlite3BtreeEnter(Btree*);
  void sqlite3BtreeLeave(Btree*);


  int sqlite3BtreeHoldsMutex(Btree*);

  void sqlite3BtreeEnterCursor(BtCursor*);
  void sqlite3BtreeLeaveCursor(BtCursor*);
  void sqlite3BtreeEnterAll(sqlite3*);
  void sqlite3BtreeLeaveAll(sqlite3*);


  int sqlite3BtreeHoldsAllMutexes(sqlite3*);

  void sqlite3BtreeMutexArrayEnter(BtreeMutexArray*);
  void sqlite3BtreeMutexArrayLeave(BtreeMutexArray*);
  void sqlite3BtreeMutexArrayInsert(BtreeMutexArray*, Btree*);
#else
# define sqlite3BtreeEnter(X)
# define sqlite3BtreeLeave(X)


# define sqlite3BtreeHoldsMutex(X) 1

# define sqlite3BtreeEnterCursor(X)
# define sqlite3BtreeLeaveCursor(X)
# define sqlite3BtreeEnterAll(X)
# define sqlite3BtreeLeaveAll(X)


# define sqlite3BtreeHoldsAllMutexes(X) 1

# define sqlite3BtreeMutexArrayEnter(X)
# define sqlite3BtreeMutexArrayLeave(X)
# define sqlite3BtreeMutexArrayInsert(X,Y)
#endif


#endif /* _BTREE_H_ */







>
>

>




>
>

>






>
>

>




>
>

>







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
** If we are not using shared cache, then there is no need to
** use mutexes to access the BtShared structures.  So make the
** Enter and Leave procedures no-ops.
*/
#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE
  void sqlite3BtreeEnter(Btree*);
  void sqlite3BtreeLeave(Btree*);
#ifndef NDEBUG
  /* This routine is used inside assert() statements only. */
  int sqlite3BtreeHoldsMutex(Btree*);
#endif
  void sqlite3BtreeEnterCursor(BtCursor*);
  void sqlite3BtreeLeaveCursor(BtCursor*);
  void sqlite3BtreeEnterAll(sqlite3*);
  void sqlite3BtreeLeaveAll(sqlite3*);
#ifndef NDEBUG
  /* This routine is used inside assert() statements only. */
  int sqlite3BtreeHoldsAllMutexes(sqlite3*);
#endif
  void sqlite3BtreeMutexArrayEnter(BtreeMutexArray*);
  void sqlite3BtreeMutexArrayLeave(BtreeMutexArray*);
  void sqlite3BtreeMutexArrayInsert(BtreeMutexArray*, Btree*);
#else
# define sqlite3BtreeEnter(X)
# define sqlite3BtreeLeave(X)
#ifndef NDEBUG
  /* This routine is used inside assert() statements only. */
# define sqlite3BtreeHoldsMutex(X) 1
#endif
# define sqlite3BtreeEnterCursor(X)
# define sqlite3BtreeLeaveCursor(X)
# define sqlite3BtreeEnterAll(X)
# define sqlite3BtreeLeaveAll(X)
#ifndef NDEBUG
  /* This routine is used inside assert() statements only. */
# define sqlite3BtreeHoldsAllMutexes(X) 1
#endif
# define sqlite3BtreeMutexArrayEnter(X)
# define sqlite3BtreeMutexArrayLeave(X)
# define sqlite3BtreeMutexArrayInsert(X,Y)
#endif


#endif /* _BTREE_H_ */