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
d09403de
Commit
d09403de
authored
Jun 11, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the uses of PER_CHANGED() that weren't checking the result for
an error return.
parent
1f988334
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
src/BTrees/BTreeTemplate.c
src/BTrees/BTreeTemplate.c
+3
-2
src/BTrees/BucketTemplate.c
src/BTrees/BucketTemplate.c
+12
-9
No files found.
src/BTrees/BTreeTemplate.c
View file @
d09403de
...
...
@@ -12,7 +12,7 @@
****************************************************************************/
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.4
2 2002/06/11 02:37:57
tim_one Exp $\n"
#define BTREETEMPLATE_C "$Id: BTreeTemplate.c,v 1.4
3 2002/06/11 02:59:05
tim_one Exp $\n"
/*
** _BTree_get
...
...
@@ -111,7 +111,8 @@ BTree_split(BTree *self, int index, BTree *next)
Py_XINCREF
(
next
->
firstbucket
);
}
PER_CHANGED
(
self
);
if
(
PER_CHANGED
(
self
)
<
0
)
return
-
1
;
return
0
;
}
...
...
src/BTrees/BucketTemplate.c
View file @
d09403de
...
...
@@ -12,7 +12,7 @@
****************************************************************************/
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.3
8 2002/06/09 05:56:2
5 tim_one Exp $\n"
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.3
9 2002/06/11 02:59:0
5 tim_one Exp $\n"
/* Use BUCKET_SEARCH to find the index at which a key belongs.
* INDEX An int lvalue to hold the index i such that KEY belongs at
...
...
@@ -440,7 +440,8 @@ bucket_split(Bucket *self, int index, Bucket *next)
Py_INCREF
(
next
);
self
->
next
=
next
;
PER_CHANGED
(
self
);
if
(
PER_CHANGED
(
self
)
<
0
)
return
-
1
;
return
0
;
}
...
...
@@ -459,21 +460,23 @@ Bucket_nextBucket(Bucket *self, Bucket **r)
static
int
Bucket_deleteNextBucket
(
Bucket
*
self
)
{
int
result
=
-
1
;
/* until proven innocent */
PER_USE_OR_RETURN
(
self
,
-
1
);
if
(
self
->
next
)
{
Bucket
*
n
;
if
(
Bucket_nextBucket
(
self
->
next
,
&
n
)
<
0
)
goto
err
;
if
(
Bucket_nextBucket
(
self
->
next
,
&
n
)
<
0
)
goto
Done
;
ASSIGNB
(
self
->
next
,
n
);
PER_CHANGED
(
self
);
if
(
PER_CHANGED
(
self
)
<
0
)
goto
Done
;
}
result
=
0
;
Done:
PER_ALLOW_DEACTIVATION
(
self
);
PER_ACCESSED
(
self
);
return
0
;
err:
PER_ALLOW_DEACTIVATION
(
self
);
PER_ACCESSED
(
self
);
return
-
1
;
return
result
;
}
/*
...
...
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