Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
405894e8
Commit
405894e8
authored
Jun 08, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Brought the _bucket_get comments into synch with what the code actually
does.
parent
bea890b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
src/BTrees/BucketTemplate.c
src/BTrees/BucketTemplate.c
+19
-8
No files found.
src/BTrees/BucketTemplate.c
View file @
405894e8
...
...
@@ -12,21 +12,32 @@
****************************************************************************/
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.3
4 2002/06/08 15:57:48
tim_one Exp $\n"
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.3
5 2002/06/08 16:16:32
tim_one Exp $\n"
/*
** _bucket_get
**
**
Get the bucket item with the matching key
**
Search a bucket for a given key.
**
** Arguments: self The bucket
** key The key to match against
** has_key Just return object "1" if key found, object "0" if not
** Arguments
** self The bucket
** keyarg The key to look for
** has_key Boolean; if true, return a true/false result; else return
** the value associated with the key.
**
** Returns: object matching object or 0/1 object
** Return
** If has_key:
** Returns the Python int 0 if the key is absent, else returns
** has_key itself as a Python int. A BTree caller generally passes
** the depth of the bucket for has_key, so a true result returns
** the bucket depth then.
** Note that has_key should be tree when searching set buckets.
** If not has_key:
** If the key is present, returns the associated value, and the
** caller owns the reference. Else returns NULL and sets KeyError.
** Whether or not has_key:
** If a comparison sets an exception, returns NULL.
*/
static
PyObject
*
_bucket_get
(
Bucket
*
self
,
PyObject
*
keyarg
,
int
has_key
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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