Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
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
Kirill Smelkov
BTrees
Commits
7991529d
Commit
7991529d
authored
Dec 14, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better argument name.
parent
fce28b5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
BTrees/BTreeItemsTemplate.c
BTrees/BTreeItemsTemplate.c
+5
-6
No files found.
BTrees/BTreeItemsTemplate.c
View file @
7991529d
...
...
@@ -409,21 +409,20 @@ BTreeItems_slice(BTreeItems *self, Py_ssize_t ilow, Py_ssize_t ihigh)
}
static
PyObject
*
BTreeItems_subscript
(
BTreeItems
*
self
,
PyObject
*
key
)
BTreeItems_subscript
(
BTreeItems
*
self
,
PyObject
*
subscript
)
{
Py_ssize_t
len
=
BTreeItems_length_or_nonzero
(
self
,
0
);
if
(
PyIndex_Check
(
key
))
if
(
PyIndex_Check
(
subscript
))
{
Py_ssize_t
i
=
INT_AS_LONG
(
key
);
i
=
PyNumber_AsSsize_t
(
key
,
PyExc_IndexError
);
Py_ssize_t
i
=
PyNumber_AsSsize_t
(
subscript
,
PyExc_IndexError
);
if
(
i
==
-
1
&&
PyErr_Occurred
())
return
NULL
;
if
(
i
<
0
)
i
+=
len
;
return
BTreeItems_item
(
self
,
i
);
}
if
(
PySlice_Check
(
key
))
if
(
PySlice_Check
(
subscript
))
{
Py_ssize_t
start
,
stop
,
step
,
slicelength
;
...
...
@@ -433,7 +432,7 @@ BTreeItems_subscript(BTreeItems *self, PyObject* key)
#define SLICEOBJ(x) (PySliceObject*)(x)
#endif
if
(
PySlice_GetIndicesEx
(
SLICEOBJ
(
key
),
len
,
if
(
PySlice_GetIndicesEx
(
SLICEOBJ
(
subscript
),
len
,
&
start
,
&
stop
,
&
step
,
&
slicelength
)
<
0
)
{
return
NULL
;
...
...
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