Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HAMANO Tsukasa
OpenLDAP
Commits
b56be64d
Commit
b56be64d
authored
Sep 10, 2011
by
Hallvard Furuseth
Browse files
Drop ULONG in favor of size_t.
parent
b1cfff4a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
libraries/libmdb/mdb.c
View file @
b56be64d
This diff is collapsed.
Click to expand it.
libraries/libmdb/mdb.h
View file @
b56be64d
...
...
@@ -232,10 +232,10 @@ typedef struct MDB_stat {
unsigned
int
ms_psize
;
/**< Size of a database page.
This is currently the same for all databases. */
unsigned
int
ms_depth
;
/**< Depth (height) of the B-tree */
unsigned
long
ms_branch_pages
;
/**< Number of internal (non-leaf) pages */
unsigned
long
ms_leaf_pages
;
/**< Number of leaf pages */
unsigned
long
ms_overflow_pages
;
/**< Number of overflow pages */
unsigned
long
ms_entries
;
/**< Number of data items */
size_t
ms_branch_pages
;
/**< Number of internal (non-leaf) pages */
size_t
ms_leaf_pages
;
/**< Number of leaf pages */
size_t
ms_overflow_pages
;
/**< Number of overflow pages */
size_t
ms_entries
;
/**< Number of data items */
}
MDB_stat
;
/** Return the mdb library version information.
...
...
@@ -542,7 +542,7 @@ int mdb_txn_renew(MDB_txn *txn);
* <li>#MDB_INTEGERKEY
* Keys are binary integers in native byte order. Setting this option
* requires all keys to be the same size, typically sizeof(int)
* or sizeof(
long
).
* or sizeof(
size_t
).
* <li>#MDB_DUPFIXED
* This flag may only be used in combination with #MDB_DUPSORT. This option
* tells the library that the data items for this database are all the same
...
...
@@ -839,7 +839,7 @@ int mdb_cursor_del(MDB_cursor *cursor, unsigned int flags);
* <li>EINVAL - cursor is not initialized, or an invalid parameter was specified.
* </ul>
*/
int
mdb_cursor_count
(
MDB_cursor
*
cursor
,
unsigned
long
*
countp
);
int
mdb_cursor_count
(
MDB_cursor
*
cursor
,
size_t
*
countp
);
/** Compare two data items according to a particular database.
* This returns a comparison as if the two data items were keys in the
...
...
libraries/libmdb/mdb_stat.c
View file @
b56be64d
...
...
@@ -52,10 +52,10 @@ int main(int argc,char * argv[])
rc
=
mdb_stat
(
txn
,
dbi
,
&
mst
);
printf
(
"Page size: %u
\n
"
,
mst
.
ms_psize
);
printf
(
"Tree depth: %u
\n
"
,
mst
.
ms_depth
);
printf
(
"Branch pages: %
l
u
\n
"
,
mst
.
ms_branch_pages
);
printf
(
"Leaf pages: %
l
u
\n
"
,
mst
.
ms_leaf_pages
);
printf
(
"Overflow pages: %
l
u
\n
"
,
mst
.
ms_overflow_pages
);
printf
(
"Entries: %
l
u
\n
"
,
mst
.
ms_entries
);
printf
(
"Branch pages: %
z
u
\n
"
,
mst
.
ms_branch_pages
);
printf
(
"Leaf pages: %
z
u
\n
"
,
mst
.
ms_leaf_pages
);
printf
(
"Overflow pages: %
z
u
\n
"
,
mst
.
ms_overflow_pages
);
printf
(
"Entries: %
z
u
\n
"
,
mst
.
ms_entries
);
mdb_close
(
txn
,
dbi
);
mdb_txn_abort
(
txn
);
mdb_env_close
(
env
);
...
...
libraries/libmdb/midl.h
View file @
b56be64d
...
...
@@ -26,19 +26,20 @@
#ifndef _MDB_MIDL_H_
#define _MDB_MIDL_H_
#include
<stddef.h>
/** @defgroup internal MDB Internals
* @{
*/
/** ULONG should be the largest integer type supported on a machine.
* It should be equal to the size of a pointer.
*/
#define ULONG unsigned long
/** @defgroup idls ID List Management
* @{
*/
/** A generic ID number. These were entryIDs in back-bdb.
* It should be the largest integer type supported on a machine.
* It should be equal to the size of a pointer.
*/
typedef
ULONG
ID
;
typedef
size_t
ID
;
/** An IDL is an ID List, a sorted array of IDs. The first
* element of the array is a counter for how many actual
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment