Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
a0e097bb
Commit
a0e097bb
authored
Jun 13, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BTree_findRangeEnd(): Rearranged the persistence macros to cut down a
little on redundant activations.
parent
d82d25a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
src/BTrees/BTreeTemplate.c
src/BTrees/BTreeTemplate.c
+15
-17
No files found.
src/BTrees/BTreeTemplate.c
View file @
a0e097bb
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
****************************************************************************/
****************************************************************************/
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.4
8 2002/06/13 04:28:06
tim_one Exp $\n"
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.4
9 2002/06/13 04:49:01
tim_one Exp $\n"
/*
/*
** _BTree_get
** _BTree_get
...
@@ -967,18 +967,18 @@ BTree_findRangeEnd(BTree *self, PyObject *keyarg, int low,
...
@@ -967,18 +967,18 @@ BTree_findRangeEnd(BTree *self, PyObject *keyarg, int low,
}
}
/* High-end search: if it's possible to go left, do so. */
/* High-end search: if it's possible to go left, do so. */
else
if
(
deepest_smaller
)
{
else
if
(
deepest_smaller
)
{
UNLESS
(
PER_USE
(
deepest_smaller
))
goto
Done
;
if
(
deepest_smaller_is_btree
)
{
if
(
deepest_smaller_is_btree
)
{
UNLESS
(
PER_USE
(
deepest_smaller
))
goto
Done
;
/* We own the reference this returns. */
/* We own the reference this returns. */
pbucket
=
BTree_lastBucket
(
BTREE
(
deepest_smaller
));
pbucket
=
BTree_lastBucket
(
BTREE
(
deepest_smaller
));
PER_ALLOW_DEACTIVATION
(
deepest_smaller
);
PER_ACCESSED
(
deepest_smaller
);
if
(
pbucket
==
NULL
)
goto
Done
;
/* error */
}
}
else
{
else
{
pbucket
=
BUCKET
(
deepest_smaller
);
pbucket
=
BUCKET
(
deepest_smaller
);
Py_INCREF
(
pbucket
);
Py_INCREF
(
pbucket
);
}
}
PER_ALLOW_DEACTIVATION
(
deepest_smaller
);
PER_ACCESSED
(
deepest_smaller
);
if
(
pbucket
)
{
UNLESS
(
PER_USE
(
pbucket
))
goto
Done
;
UNLESS
(
PER_USE
(
pbucket
))
goto
Done
;
result
=
1
;
result
=
1
;
*
bucket
=
pbucket
;
/* transfer ownership to caller */
*
bucket
=
pbucket
;
/* transfer ownership to caller */
...
@@ -986,8 +986,6 @@ BTree_findRangeEnd(BTree *self, PyObject *keyarg, int low,
...
@@ -986,8 +986,6 @@ BTree_findRangeEnd(BTree *self, PyObject *keyarg, int low,
PER_ALLOW_DEACTIVATION
(
pbucket
);
PER_ALLOW_DEACTIVATION
(
pbucket
);
PER_ACCESSED
(
pbucket
);
PER_ACCESSED
(
pbucket
);
}
}
/* pbucket NULL is an error */
}
else
else
result
=
0
;
/* simply not found */
result
=
0
;
/* simply not found */
...
...
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